Skip to content

Commit 8652f17

Browse files
zenczykowskidavem330
authored andcommitted
ipv6: addrconf_f6i_alloc - fix non-null pointer check to !IS_ERR()
Fixes a stupid bug I recently introduced... ip6_route_info_create() returns an ERR_PTR(err) and not a NULL on error. Fixes: d55a2e3 ("net-ipv6: fix excessive RTF_ADDRCONF flag on ::1/128 local route (and others)'") Cc: David Ahern <[email protected]> Cc: Lorenzo Colitti <[email protected]> Cc: Eric Dumazet <[email protected]> Signed-off-by: Maciej Żenczykowski <[email protected]> Reported-by: syzbot <[email protected]> Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent fe163e5 commit 8652f17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv6/route.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4406,7 +4406,7 @@ struct fib6_info *addrconf_f6i_alloc(struct net *net,
44064406
}
44074407

44084408
f6i = ip6_route_info_create(&cfg, gfp_flags, NULL);
4409-
if (f6i)
4409+
if (!IS_ERR(f6i))
44104410
f6i->dst_nocount = true;
44114411
return f6i;
44124412
}

0 commit comments

Comments
 (0)