Thread (6 messages) flat view 6 messages, 3 authors, 2016-08-17

Re: [PATCH] net: ipv6: Remove addresses for failures with strict DAD

From: Mike Manning <hidden>
Date: 2016-08-17 16:33:01

On 08/17/2016 04:40 PM, Hannes Frederic Sowa wrote:
On 17.08.2016 12:28, Mike Manning wrote:
quoted
+static void dev_disable_change(struct inet6_dev *idev);
 
 /*
  *	Configured unicast address hash table
@@ -1945,6 +1946,12 @@ lock_errdad:
 
 			pr_info("%s: IPv6 being disabled!\n",
 				ifp->idev->dev->name);
+			spin_unlock_bh(&ifp->lock);
+			addrconf_dad_stop(ifp, 1);
+			rtnl_lock();
+			dev_disable_change(idev);
+			rtnl_unlock();
+			return;
 		}
 	}
You can't take rtnl_lock at that point but must postpone the actions and
do that in addrconf_dad_work.

Probably the whole ... else if (idev->cnf.accept_dad > 1 && ...) needs
to move there.

Bye,
Hannes
Thanks for the prompt review, I will look into making these changes.

Also these changes caused a build error due to conditional compilation without CONFIG_SYSCTL, which is resolved by replacing the call to dev_disable_change(idev) by directly calling addrconf_ifdown(idev->dev, 0) instead.

I would appreciate any further comments if the suggested change in behavior is not acceptable.

Thanks
Mike
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help