]> Pileus Git - ~andy/linux/commit
batman-adv: free an hard-interface before adding it
authorAntonio Quartulli <ordex@autistici.org>
Sat, 16 Feb 2013 13:42:39 +0000 (14:42 +0100)
committerAntonio Quartulli <ordex@autistici.org>
Wed, 27 Mar 2013 09:29:53 +0000 (10:29 +0100)
commitcb4b0d48645fa29bc0e12537d4e3556c4bf79ac7
treeebd1e583f63c67f5a5dff26008ab7cfc16822684
parent3dbd550b8b2e204833d8305451bbde990e1cd743
batman-adv: free an hard-interface before adding it

When adding a new hard interface (e.g. wlan0) to a soft interface (e.g. bat0)
and the former is already enslaved in another virtual interface (e.g. a software
bridge) batman-adv has to free it first and then continue with the adding
mechanism.

In this way the behaviour becomes consistent with what "ip link set master"
does. At the moment batman-adv enslaves the hard interface without checking for
the master device, possibly causing strange behaviours which are never wanted by
the users.

Reported-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
net/batman-adv/hard-interface.c