diff options
author | Maciej Żenczykowski <[email protected]> | 2019-09-05 20:56:37 -0700 |
---|---|---|
committer | David S. Miller <[email protected]> | 2019-09-07 17:46:44 +0200 |
commit | 8652f17c658d03f5c87b8dee6e8e52480c6cd37d (patch) | |
tree | 6c5db08d73d4c16ae3cbce16cebc8b86a344632d | |
parent | fe163e534e5eecdfd7b5920b0dfd24c458ee85d6 (diff) |
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: d55a2e374a94 ("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]>
-rw-r--r-- | net/ipv6/route.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 85bcd97f7a72..546088e50815 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -4406,7 +4406,7 @@ struct fib6_info *addrconf_f6i_alloc(struct net *net, } f6i = ip6_route_info_create(&cfg, gfp_flags, NULL); - if (f6i) + if (!IS_ERR(f6i)) f6i->dst_nocount = true; return f6i; } |