summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/routing.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-01-06 14:24:49 -0500
committerDavid S. Miller <davem@davemloft.net>2015-01-06 14:24:49 -0500
commit627d2cc016b67bd94f476d30fc4b3a031bac6fa7 (patch)
tree7d47d6e2f78e583f2f3b0608247d00507d6c0e17 /net/batman-adv/routing.c
parent07ff890daeda31cf23173865edf50bcb03e100c3 (diff)
parent9d31b3ce81683ce3c9fd10afa70892e373b21067 (diff)
downloadtalos-op-linux-627d2cc016b67bd94f476d30fc4b3a031bac6fa7.tar.gz
talos-op-linux-627d2cc016b67bd94f476d30fc4b3a031bac6fa7.zip
Merge tag 'batman-adv-fix-for-davem' of git://git.open-mesh.org/linux-merge
Included changes: - ensure bonding is used (if enabled) for packets coming in the soft interface - fix race condition to avoid orig_nodes to be deleted right after being added - avoid false positive lockdep splats by assigning lockclass to the proper hashtable lock objects - avoid miscounting of multicast 'disabled' nodes in the network - fix memory leak in the Global Translation Table in case of originator interval change Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/batman-adv/routing.c')
-rw-r--r--net/batman-adv/routing.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
index 35f76f2f7824..6648f321864d 100644
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -443,11 +443,13 @@ batadv_find_router(struct batadv_priv *bat_priv,
router = batadv_orig_router_get(orig_node, recv_if);
+ if (!router)
+ return router;
+
/* only consider bonding for recv_if == BATADV_IF_DEFAULT (first hop)
* and if activated.
*/
- if (recv_if == BATADV_IF_DEFAULT || !atomic_read(&bat_priv->bonding) ||
- !router)
+ if (!(recv_if == BATADV_IF_DEFAULT && atomic_read(&bat_priv->bonding)))
return router;
/* bonding: loop through the list of possible routers found
OpenPOWER on IntegriCloud