ipv6: fix throw routes
[openwrt/staging/chunkeey.git] / target / linux / generic / patches-3.10 / 668-fix-ipv6-throw-routes.patch
1 From 9cd600244515bd4540898411ab781a97f0cc387f Mon Sep 17 00:00:00 2001
2 From: Steven Barth <steven@midlink.org>
3 Date: Thu, 19 Mar 2015 11:54:50 +0100
4 Subject: [PATCH] ipv6: fix backtracking for throw routes
5
6 for throw routes to trigger evaluation of other policy rules
7 EAGAIN needs to be propagated up to fib_rules_lookup
8 similar to how its done for IPv4
9
10 A simple testcase for verification is:
11
12 ip -6 rule add lookup 33333 priority 33333
13 ip -6 route add throw 2001:db8::1
14 ip -6 route add 2001:db8::1 via fe80::1 dev wlan0 table 33333
15 ip route get 2001:db8::1
16
17 Signed-off-by: Steven Barth <cyrus@openwrt.org>
18 ---
19 net/ipv6/fib6_rules.c | 1 +
20 1 file changed, 1 insertion(+)
21
22 diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
23 index b4d5e1d..27ca796 100644
24 --- a/net/ipv6/fib6_rules.c
25 +++ b/net/ipv6/fib6_rules.c
26 @@ -104,6 +104,7 @@ static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp,
27 goto again;
28 flp6->saddr = saddr;
29 }
30 + err = rt->dst.error;
31 goto out;
32 }
33 again:
34 --
35 2.1.4
36