From: Maciej Żenczykowski <m...@google.com> 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 <dsah...@gmail.com> Cc: Lorenzo Colitti <lore...@google.com> Cc: Eric Dumazet <eduma...@google.com> Signed-off-by: Maciej Żenczykowski <m...@google.com> --- net/ipv6/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 003562dd3395..2fb2b913214c 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -4383,7 +4383,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; } -- 2.23.0.187.g17f5b7556c-goog