|
@@ -1915,7 +1915,8 @@ void rt6_purge_dflt_routers(struct net *net)
|
|
|
restart:
|
|
restart:
|
|
|
read_lock_bh(&table->tb6_lock);
|
|
read_lock_bh(&table->tb6_lock);
|
|
|
for (rt = table->tb6_root.leaf; rt; rt = rt->dst.rt6_next) {
|
|
for (rt = table->tb6_root.leaf; rt; rt = rt->dst.rt6_next) {
|
|
|
- if (rt->rt6i_flags & (RTF_DEFAULT | RTF_ADDRCONF)) {
|
|
|
|
|
|
|
+ if (rt->rt6i_flags & (RTF_DEFAULT | RTF_ADDRCONF) &&
|
|
|
|
|
+ (!rt->rt6i_idev || rt->rt6i_idev->cnf.accept_ra != 2)) {
|
|
|
dst_hold(&rt->dst);
|
|
dst_hold(&rt->dst);
|
|
|
read_unlock_bh(&table->tb6_lock);
|
|
read_unlock_bh(&table->tb6_lock);
|
|
|
ip6_del_rt(rt);
|
|
ip6_del_rt(rt);
|