]> git.baikalelectronics.ru Git - kernel.git/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)
commite5cf526f825674c8e3b821152516f100dc2c589e
treeebd1e583f63c67f5a5dff26008ab7cfc16822684
parent109ea559e75a4b99bf420b3f852e37a00a3b7bd1
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