Re: [B.A.T.M.A.N.] [PATCHv3 1/2] batman-adv: free an hard-interface before adding it

Marek Lindner
2013-02-27T06:28:07Z

On Saturday, February 16, 2013 21:42:39 Antonio Quartulli wrote:
> When adding a new hard interface (e.h. 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 the 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>
> ---
> v2:
> - added compat code for netdev_master_upper_dev_get()
> v3:
> - use #define instead of a static inline function in compat code
>
> compat.h | 5 +++++
> hard-interface.c | 14 ++++++++------
> 2 files changed, 13 insertions(+), 6 deletions(-)

Applied in revision 5e57e3b.

Thanks,
Marek