Repository : ssh://git@open-mesh.org/batman-adv
On branch : next
commit a1eecddcb39f1a25506683d98ce349087b258ab4 Author: Antonio Quartulli ordex@autistici.org Date: Mon Mar 25 09:24:10 2013 +0100
batman-adv: fix interface clean up on error
When enabling an hard_iface for the first time, the hard_iface->soft_iface member is initialised with the newly created soft_iface. However, in case of error during the activation procedure this member has to be set to NULL again, otherwise the hard_iface will result busy and will not be possible to use it anymore
This issue has been introduced with edd08535c00a42143989118bc999060893ce0a41 ("batman-adv: Allow to modify slaves of soft-interfaces through rntl_link")
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
a1eecddcb39f1a25506683d98ce349087b258ab4 hard-interface.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/hard-interface.c b/hard-interface.c index 37c1b51..522243a 100644 --- a/hard-interface.c +++ b/hard-interface.c @@ -435,6 +435,7 @@ out: err_upper: netdev_upper_dev_unlink(hard_iface->net_dev, soft_iface); err_dev: + hard_iface->soft_iface = NULL; dev_put(soft_iface); err: batadv_hardif_free_ref(hard_iface);