diff options
-rw-r--r-- | net/ipv6/route.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index bbca50ae830..57ac863378e 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -1886,7 +1886,8 @@ void rt6_purge_dflt_routers(struct net *net) | |||
1886 | restart: | 1886 | restart: |
1887 | read_lock_bh(&table->tb6_lock); | 1887 | read_lock_bh(&table->tb6_lock); |
1888 | for (rt = table->tb6_root.leaf; rt; rt = rt->dst.rt6_next) { | 1888 | for (rt = table->tb6_root.leaf; rt; rt = rt->dst.rt6_next) { |
1889 | if (rt->rt6i_flags & (RTF_DEFAULT | RTF_ADDRCONF)) { | 1889 | if (rt->rt6i_flags & (RTF_DEFAULT | RTF_ADDRCONF) && |
1890 | (!rt->rt6i_idev || rt->rt6i_idev->cnf.accept_ra != 2)) { | ||
1890 | dst_hold(&rt->dst); | 1891 | dst_hold(&rt->dst); |
1891 | read_unlock_bh(&table->tb6_lock); | 1892 | read_unlock_bh(&table->tb6_lock); |
1892 | ip6_del_rt(rt); | 1893 | ip6_del_rt(rt); |