AA: linux: Backport r36911
[12.09/openwrt.git] / target / linux / generic / patches-3.3 / 668-ipv6-fix-handling-of-throw-routes.patch
diff --git a/target/linux/generic/patches-3.3/668-ipv6-fix-handling-of-throw-routes.patch b/target/linux/generic/patches-3.3/668-ipv6-fix-handling-of-throw-routes.patch
new file mode 100644 (file)
index 0000000..f8d6053
--- /dev/null
@@ -0,0 +1,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;