Commit 8652f17c authored by Maciej Żenczykowski's avatar Maciej Żenczykowski Committed by David S. Miller

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: d55a2e37 ("net-ipv6: fix excessive RTF_ADDRCONF flag on ::1/128 local route (and others)'")
Cc: David Ahern <dsahern@gmail.com>
Cc: Lorenzo Colitti <lorenzo@google.com>
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: default avatarMaciej Żenczykowski <maze@google.com>
Reported-by: default avatarsyzbot <syzkaller@googlegroups.com>
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fe163e53
...@@ -4406,7 +4406,7 @@ struct fib6_info *addrconf_f6i_alloc(struct net *net, ...@@ -4406,7 +4406,7 @@ struct fib6_info *addrconf_f6i_alloc(struct net *net,
} }
f6i = ip6_route_info_create(&cfg, gfp_flags, NULL); f6i = ip6_route_info_create(&cfg, gfp_flags, NULL);
if (f6i) if (!IS_ERR(f6i))
f6i->dst_nocount = true; f6i->dst_nocount = true;
return f6i; return f6i;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment