diff options
author | Steven Barth <steven@midlink.org> | 2015-03-19 15:46:03 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2015-03-19 15:46:03 +0000 |
commit | a1e390d52ae2a595bf6281edae7a2269edd7ae8d (patch) | |
tree | 4e4bb8a200ca94b3b076e7a4ab99631b44562fcf /target/linux/generic | |
parent | c64a6c44e61fe18541bded5aa02565250312b719 (diff) | |
download | master-187ad058-a1e390d52ae2a595bf6281edae7a2269edd7ae8d.tar.gz master-187ad058-a1e390d52ae2a595bf6281edae7a2269edd7ae8d.tar.bz2 master-187ad058-a1e390d52ae2a595bf6281edae7a2269edd7ae8d.zip |
ipv6: fix throw routes
Signed-off-by: Steven Barth <steven@midlink.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44894 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic')
5 files changed, 180 insertions, 0 deletions
diff --git a/target/linux/generic/patches-3.10/668-fix-ipv6-throw-routes.patch b/target/linux/generic/patches-3.10/668-fix-ipv6-throw-routes.patch new file mode 100644 index 0000000000..f21e6f4b66 --- /dev/null +++ b/target/linux/generic/patches-3.10/668-fix-ipv6-throw-routes.patch @@ -0,0 +1,36 @@ +From 9cd600244515bd4540898411ab781a97f0cc387f Mon Sep 17 00:00:00 2001 +From: Steven Barth <steven@midlink.org> +Date: Thu, 19 Mar 2015 11:54:50 +0100 +Subject: [PATCH] ipv6: fix backtracking for throw routes + +for throw routes to trigger evaluation of other policy rules +EAGAIN needs to be propagated up to fib_rules_lookup +similar to how its done for IPv4 + +A simple testcase for verification is: + +ip -6 rule add lookup 33333 priority 33333 +ip -6 route add throw 2001:db8::1 +ip -6 route add 2001:db8::1 via fe80::1 dev wlan0 table 33333 +ip route get 2001:db8::1 + +Signed-off-by: Steven Barth <cyrus@openwrt.org> +--- + net/ipv6/fib6_rules.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c +index b4d5e1d..27ca796 100644 +--- a/net/ipv6/fib6_rules.c ++++ b/net/ipv6/fib6_rules.c +@@ -104,6 +104,7 @@ static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp, + goto again; + flp6->saddr = saddr; + } ++ err = rt->dst.error; + goto out; + } + again: +-- +2.1.4 + diff --git a/target/linux/generic/patches-3.14/668-fix-ipv6-throw-routes.patch b/target/linux/generic/patches-3.14/668-fix-ipv6-throw-routes.patch new file mode 100644 index 0000000000..f21e6f4b66 --- /dev/null +++ b/target/linux/generic/patches-3.14/668-fix-ipv6-throw-routes.patch @@ -0,0 +1,36 @@ +From 9cd600244515bd4540898411ab781a97f0cc387f Mon Sep 17 00:00:00 2001 +From: Steven Barth <steven@midlink.org> +Date: Thu, 19 Mar 2015 11:54:50 +0100 +Subject: [PATCH] ipv6: fix backtracking for throw routes + +for throw routes to trigger evaluation of other policy rules +EAGAIN needs to be propagated up to fib_rules_lookup +similar to how its done for IPv4 + +A simple testcase for verification is: + +ip -6 rule add lookup 33333 priority 33333 +ip -6 route add throw 2001:db8::1 +ip -6 route add 2001:db8::1 via fe80::1 dev wlan0 table 33333 +ip route get 2001:db8::1 + +Signed-off-by: Steven Barth <cyrus@openwrt.org> +--- + net/ipv6/fib6_rules.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c +index b4d5e1d..27ca796 100644 +--- a/net/ipv6/fib6_rules.c ++++ b/net/ipv6/fib6_rules.c +@@ -104,6 +104,7 @@ static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp, + goto again; + flp6->saddr = saddr; + } ++ err = rt->dst.error; + goto out; + } + again: +-- +2.1.4 + diff --git a/target/linux/generic/patches-3.18/668-fix-ipv6-throw-routes.patch b/target/linux/generic/patches-3.18/668-fix-ipv6-throw-routes.patch new file mode 100644 index 0000000000..f21e6f4b66 --- /dev/null +++ b/target/linux/generic/patches-3.18/668-fix-ipv6-throw-routes.patch @@ -0,0 +1,36 @@ +From 9cd600244515bd4540898411ab781a97f0cc387f Mon Sep 17 00:00:00 2001 +From: Steven Barth <steven@midlink.org> +Date: Thu, 19 Mar 2015 11:54:50 +0100 +Subject: [PATCH] ipv6: fix backtracking for throw routes + +for throw routes to trigger evaluation of other policy rules +EAGAIN needs to be propagated up to fib_rules_lookup +similar to how its done for IPv4 + +A simple testcase for verification is: + +ip -6 rule add lookup 33333 priority 33333 +ip -6 route add throw 2001:db8::1 +ip -6 route add 2001:db8::1 via fe80::1 dev wlan0 table 33333 +ip route get 2001:db8::1 + +Signed-off-by: Steven Barth <cyrus@openwrt.org> +--- + net/ipv6/fib6_rules.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c +index b4d5e1d..27ca796 100644 +--- a/net/ipv6/fib6_rules.c ++++ b/net/ipv6/fib6_rules.c +@@ -104,6 +104,7 @@ static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp, + goto again; + flp6->saddr = saddr; + } ++ err = rt->dst.error; + goto out; + } + again: +-- +2.1.4 + diff --git a/target/linux/generic/patches-3.19/668-fix-ipv6-throw-routes.patch b/target/linux/generic/patches-3.19/668-fix-ipv6-throw-routes.patch new file mode 100644 index 0000000000..f21e6f4b66 --- /dev/null +++ b/target/linux/generic/patches-3.19/668-fix-ipv6-throw-routes.patch @@ -0,0 +1,36 @@ +From 9cd600244515bd4540898411ab781a97f0cc387f Mon Sep 17 00:00:00 2001 +From: Steven Barth <steven@midlink.org> +Date: Thu, 19 Mar 2015 11:54:50 +0100 +Subject: [PATCH] ipv6: fix backtracking for throw routes + +for throw routes to trigger evaluation of other policy rules +EAGAIN needs to be propagated up to fib_rules_lookup +similar to how its done for IPv4 + +A simple testcase for verification is: + +ip -6 rule add lookup 33333 priority 33333 +ip -6 route add throw 2001:db8::1 +ip -6 route add 2001:db8::1 via fe80::1 dev wlan0 table 33333 +ip route get 2001:db8::1 + +Signed-off-by: Steven Barth <cyrus@openwrt.org> +--- + net/ipv6/fib6_rules.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c +index b4d5e1d..27ca796 100644 +--- a/net/ipv6/fib6_rules.c ++++ b/net/ipv6/fib6_rules.c +@@ -104,6 +104,7 @@ static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp, + goto again; + flp6->saddr = saddr; + } ++ err = rt->dst.error; + goto out; + } + again: +-- +2.1.4 + diff --git a/target/linux/generic/patches-4.0/668-fix-ipv6-throw-routes.patch b/target/linux/generic/patches-4.0/668-fix-ipv6-throw-routes.patch new file mode 100644 index 0000000000..f21e6f4b66 --- /dev/null +++ b/target/linux/generic/patches-4.0/668-fix-ipv6-throw-routes.patch @@ -0,0 +1,36 @@ +From 9cd600244515bd4540898411ab781a97f0cc387f Mon Sep 17 00:00:00 2001 +From: Steven Barth <steven@midlink.org> +Date: Thu, 19 Mar 2015 11:54:50 +0100 +Subject: [PATCH] ipv6: fix backtracking for throw routes + +for throw routes to trigger evaluation of other policy rules +EAGAIN needs to be propagated up to fib_rules_lookup +similar to how its done for IPv4 + +A simple testcase for verification is: + +ip -6 rule add lookup 33333 priority 33333 +ip -6 route add throw 2001:db8::1 +ip -6 route add 2001:db8::1 via fe80::1 dev wlan0 table 33333 +ip route get 2001:db8::1 + +Signed-off-by: Steven Barth <cyrus@openwrt.org> +--- + net/ipv6/fib6_rules.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c +index b4d5e1d..27ca796 100644 +--- a/net/ipv6/fib6_rules.c ++++ b/net/ipv6/fib6_rules.c +@@ -104,6 +104,7 @@ static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp, + goto again; + flp6->saddr = saddr; + } ++ err = rt->dst.error; + goto out; + } + again: +-- +2.1.4 + |