openwrt_archive/target/linux/generic/patches-3.3/668-ipv6-fix-handling-of-throw-routes.patch
Hauke Mehrtens 00411c9186 AA: kernel: refresh patches
SVN-Revision: 37262
2013-07-11 22:24:10 +00:00

33 lines
856 B
Diff

--- 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;