aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/patches-3.3/668-ipv6-fix-handling-of-throw-routes.patch
blob: b9c01ec226fe9e7b3995fb1d36e46bb5b227da12 (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
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1341,6 +1341,9 @@ int ip6_route_add(struct fib6_config *cf
 		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 @@ static int rtm_to_fib6_config(struct sk_
 
 	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 @@ static int rt6_fill_node(struct net *net
 		case -EACCES:
 			rtm->rtm_type = RTN_PROHIBIT;
 			break;
+		case -EAGAIN:
+			rtm->rtm_type = RTN_THROW;
+			break;
 		default:
 			rtm->rtm_type = RTN_UNREACHABLE;
 			break;