openwrt_deco_e4r/target/linux/generic/patches-3.4/668-ipv6-fix-handling-of-throw-routes.patch

35 lines
934 B
Diff

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;