summaryrefslogtreecommitdiff
path: root/net/batman-adv/originator.c
diff options
context:
space:
mode:
authorSimon Wunderlich <simon@open-mesh.com>2013-11-13 19:14:50 +0100
committerAntonio Quartulli <antonio@meshcoding.com>2014-01-12 14:41:15 +0100
commitf3b3d9018975ffb2680b7c1d37122f9d80301587 (patch)
tree7bba5d71de0bfae806d91653ef8262f396bc08b3 /net/batman-adv/originator.c
parentef0a937f7a1450d3a133ccd83c9c7d07587e7a00 (diff)
downloadlwn-f3b3d9018975ffb2680b7c1d37122f9d80301587.tar.gz
lwn-f3b3d9018975ffb2680b7c1d37122f9d80301587.zip
batman-adv: add bonding again
With the new interface alternating, the first hop may send packets in a round robin fashion to it's neighbors because it has multiple valid routes built by the multi interface optimization. This patch enables the feature if bonding is selected. Note that unlike the bonding implemented before, this version is much simpler and may even enable multi path routing to a certain degree. Signed-off-by: Simon Wunderlich <simon@open-mesh.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
Diffstat (limited to 'net/batman-adv/originator.c')
-rw-r--r--net/batman-adv/originator.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c
index b8ef41600166..bd887809f08e 100644
--- a/net/batman-adv/originator.c
+++ b/net/batman-adv/originator.c
@@ -701,6 +701,10 @@ batadv_purge_orig_ifinfo(struct batadv_priv *bat_priv,
hlist_del_rcu(&orig_ifinfo->list);
batadv_orig_ifinfo_free_ref(orig_ifinfo);
+ if (orig_node->last_bonding_candidate == orig_ifinfo) {
+ orig_node->last_bonding_candidate = NULL;
+ batadv_orig_ifinfo_free_ref(orig_ifinfo);
+ }
}
spin_unlock_bh(&orig_node->neigh_list_lock);