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