Message ID | 3450805b83561af0a7de249da6bf860aee4d2524.1561131177.git.sbrivio@redhat.com |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show |
Series | Fix listing (IPv4, IPv6) and flushing (IPv6) of cached route exceptions | expand |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index c4d285fe0adc..86859023cd01 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -3827,7 +3827,8 @@ static int ip6_route_del(struct fib6_config *cfg, for_each_fib6_node_rt_rcu(fn) { struct fib6_nh *nh; - if (rt->nh && rt->nh->id != cfg->fc_nh_id) + if (rt->nh && cfg->fc_nh_id && + rt->nh->id != cfg->fc_nh_id) continue; if (cfg->fc_flags & RTF_CACHE) {