* [PATCH net-next] ipv6: fib6_rule_action_alt needs to return -EAGAIN
@ 2019-04-24 1:06 David Ahern
2019-04-24 4:53 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: David Ahern @ 2019-04-24 1:06 UTC (permalink / raw)
To: davem; +Cc: netdev, David Ahern
From: David Ahern <dsahern@gmail.com>
fib rule actions should return -EAGAIN for the rules to continue to the
next one. A recent change overwrote err with the lookup always returning
0 (future change will make it more like IPv4) which means the rules
stopped at the first (e.g., local table lookup only). Catch and reset err
to -EAGAIN.
Fixes: effda4dd97e87 ("ipv6: Pass fib6_result to fib lookups")
Signed-off-by: David Ahern <dsahern@gmail.com>
---
net/ipv6/fib6_rules.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
index 40ca850d30c9..d7bc561721ad 100644
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
@@ -163,7 +163,7 @@ static int fib6_rule_action_alt(struct fib_rule *rule, struct flowi *flp,
struct flowi6 *flp6 = &flp->u.ip6;
struct net *net = rule->fr_net;
struct fib6_table *table;
- int err = -EAGAIN, *oif;
+ int err, *oif;
u32 tb_id;
switch (rule->action) {
@@ -188,6 +188,8 @@ static int fib6_rule_action_alt(struct fib_rule *rule, struct flowi *flp,
if (!err && res->f6i != net->ipv6.fib6_null_entry)
err = fib6_rule_saddr(net, rule, flags, flp6,
res->nh->fib_nh_dev);
+ else
+ err = -EAGAIN;
return err;
}
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] ipv6: fib6_rule_action_alt needs to return -EAGAIN
2019-04-24 1:06 [PATCH net-next] ipv6: fib6_rule_action_alt needs to return -EAGAIN David Ahern
@ 2019-04-24 4:53 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-04-24 4:53 UTC (permalink / raw)
To: dsahern; +Cc: netdev, dsahern
From: David Ahern <dsahern@kernel.org>
Date: Tue, 23 Apr 2019 18:06:30 -0700
> From: David Ahern <dsahern@gmail.com>
>
> fib rule actions should return -EAGAIN for the rules to continue to the
> next one. A recent change overwrote err with the lookup always returning
> 0 (future change will make it more like IPv4) which means the rules
> stopped at the first (e.g., local table lookup only). Catch and reset err
> to -EAGAIN.
>
> Fixes: effda4dd97e87 ("ipv6: Pass fib6_result to fib lookups")
> Signed-off-by: David Ahern <dsahern@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-24 4:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-24 1:06 [PATCH net-next] ipv6: fib6_rule_action_alt needs to return -EAGAIN David Ahern
2019-04-24 4:53 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.