Skip to content

Commit

Permalink
batman-adv: Revert "fix splat on disabling an interface"
Browse files Browse the repository at this point in the history
The commit 9799c50 ("batman-adv: fix splat on disabling an interface")
fixed a warning but at the same time broke the rtnl function add_slave for
devices which were temporarily removed.

batadv_softif_slave_add requires soft_iface of and hard_iface to be NULL
before it is allowed to be enslaved. But this resetting of soft_iface to
NULL in batadv_hardif_disable_interface was removed with the aforementioned
commit.

Reported-by: Julian Labus <julian@freifunk-rtk.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Acked-by: Linus Lüssing <linus.luessing@c0d3.blue>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
  • Loading branch information
Sven Eckelmann authored and Simon Wunderlich committed Nov 4, 2016
1 parent 9799c50 commit 27915aa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/batman-adv/hard-interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,7 @@ void batadv_hardif_disable_interface(struct batadv_hard_iface *hard_iface,
batadv_softif_destroy_sysfs(hard_iface->soft_iface);
}

hard_iface->soft_iface = NULL;
batadv_hardif_put(hard_iface);

out:
Expand Down

0 comments on commit 27915aa

Please sign in to comment.