Merge pull request #241 from ecsv/batman-adv-2016.4-maint-2016-10-29
[feed/routing.git] / batman-adv / patches / 0002-batman-adv-Revert-fix-splat-on-disabling-an-interfac.patch
1 From: Sven Eckelmann <sven@narfation.org>
2 Date: Wed, 2 Nov 2016 18:14:43 +0100
3 Subject: [PATCH] batman-adv: Revert "fix splat on disabling an interface"
4
5 The commit bac7733d06fa ("batman-adv: fix splat on disabling an interface")
6 fixed a warning but at the same time broke the rtnl function add_slave for
7 devices which were temporarily removed.
8
9 batadv_softif_slave_add requires soft_iface of and hard_iface to be NULL
10 before it is allowed to be enslaved. But this resetting of soft_iface to
11 NULL in batadv_hardif_disable_interface was removed with the aforementioned
12 commit.
13
14 Reported-by: Julian Labus <julian@freifunk-rtk.de>
15 Signed-off-by: Sven Eckelmann <sven@narfation.org>
16 Acked-by: Linus Lüssing <linus.luessing@c0d3.blue>
17 ---
18 net/batman-adv/hard-interface.c | 1 +
19 1 file changed, 1 insertion(+)
20
21 diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
22 index e034afb..08ce361 100644
23 --- a/net/batman-adv/hard-interface.c
24 +++ b/net/batman-adv/hard-interface.c
25 @@ -652,6 +652,7 @@ void batadv_hardif_disable_interface(struct batadv_hard_iface *hard_iface,
26 batadv_softif_destroy_sysfs(hard_iface->soft_iface);
27 }
28
29 + hard_iface->soft_iface = NULL;
30 batadv_hardif_put(hard_iface);
31
32 out: