Skip to contentSkip to conversation

ipv6: fix backtracking for throw routes

PATCH In review Steven Barth 2 participants 2 messages Mar 19, 2015 – Mar 20, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

---
 net/ipv6/fib6_rules.c | 1 +
 1 file changed, 1 insertion(+)
net/ipv6/fib6_rules.c +1 -0
index b4d5e1d..27ca796 100644
@@ -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:
Signature · 1 line
2.1.4
maintainer
#1 lore raw

From: Steven Barth <[email protected]>
Date: Thu, 19 Mar 2015 16:16:04 +0100

Quoted 4 lines

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

Quoted 8 lines

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

Applied and queued up for -stable.