aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/patches-3.3/668-ipv6-fix-handling-of-throw-routes.patch
blob: f8d60531c67dcdebf44862b848322abfe0dafd66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Index: linux-3.3.8/net/ipv6/route.c
===================================================================
--- linux-3.3.8.orig/net/ipv6/route.c	2013-06-10 20:53:54.233355405 +0200
+++ linux-3.3.8/net/ipv6/route.c	2013-06-10 20:53:54.225355405 +0200
@@ -1341,6 +1341,9 @@
 		case RTN_PROHIBIT:
 			rt->dst.error = -EACCES;
 			break;
+		case RTN_THROW:
+			rt->dst.error = -EAGAIN;
+			break;
 		default:
 			rt->dst.error = -ENETUNREACH;
 			break;
@@ -2279,7 +2282,8 @@
 
 	if (rtm->rtm_type == RTN_UNREACHABLE ||
 	    rtm->rtm_type == RTN_BLACKHOLE ||
-	    rtm->rtm_type == RTN_PROHIBIT)
+	    rtm->rtm_type == RTN_PROHIBIT ||
+	    rtm->rtm_type == RTN_THROW)
 		cfg->fc_flags |= RTF_REJECT;
 
 	if (rtm->rtm_type == RTN_LOCAL)
@@ -2417,6 +2421,9 @@
 		case -EACCES:
 			rtm->rtm_type = RTN_PROHIBIT;
 			break;
+		case -EAGAIN:
+			rtm->rtm_type = RTN_THROW;
+			break;
 		default:
 			rtm->rtm_type = RTN_UNREACHABLE;
 			break;