Skip to contentSkip to conversation

ipv6: fix a typo in fib6_rule_lookup()

PATCH Applied Eric Dumazet 2 participants 2 messages Sep 19, 2019 – Sep 21, 2019

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

PATCH 1/1 ipv6: fix a typo in fib6_rule_lookup()

Yi Ren reported an issue discovered by syzkaller, and bisected to the cited commit.

Many thanks to Yi, this trivial patch does not reflect the patient work that has been done.

Fixes d64a1f574a29 ("ipv6: honor RT6_LOOKUP_F_DST_NOREF in rule lookup logic")
Bisected-and-Reported-by Yi Ren <[email protected]>
---
 net/ipv6/ip6_fib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv6/ip6_fib.c +1 -1
index 87f47bc55c5e3f5e5f522d153fad69d6d82e6332..6e2af411cd9cc4131c5d457e6d48f177fc6d4428 100644
@@ -318,7 +318,7 @@ struct dst_entry *fib6_rule_lookup(struct net *net, struct flowi6 *fl6,
 	if (rt->dst.error == -EAGAIN) {
 		ip6_rt_put_flags(rt, flags);
 		rt = net->ipv6.ip6_null_entry;
-		if (!(flags | RT6_LOOKUP_F_DST_NOREF))
+		if (!(flags & RT6_LOOKUP_F_DST_NOREF))
 			dst_hold(&rt->dst);
 	}
 
Signature · 1 line
2.23.0.237.gc6a4ce50a0-goog
#1 lore raw
Quoted 10 lines · Eric Dumazet

Yi Ren reported an issue discovered by syzkaller, and bisected to the cited commit.

Many thanks to Yi, this trivial patch does not reflect the patient work that has been done.

Fixes d64a1f574a29 ("ipv6: honor RT6_LOOKUP_F_DST_NOREF in rule lookup logic")
Bisected-and-Reported-by Yi Ren <[email protected]>

Apparently:

WARNING: 'Bisected-and-reported-by:' is the preferred signature form #15:

Bisected-and-Reported-by Yi Ren <[email protected]>

total: 0 errors, 1 warnings, 0 checks, 8 lines checked

So I lower-cased that R, hope that's okay.

Applied, queued, thank you!