summaryrefslogtreecommitdiffstats
path: root/net/batman-adv
diff options
context:
space:
mode:
authorAntonio Quartulli <ordex@autistici.org>2013-03-30 17:22:00 +0100
committerAntonio Quartulli <ordex@autistici.org>2013-05-29 02:44:54 +0200
commit38dc40ef52d882e08b2af71fc1b5413ac7009952 (patch)
treeaaf74d02aeca697d21e9abc23d9a3e705cde50c0 /net/batman-adv
parentbatman-adv: don't check compat version twice (diff)
downloadlinux-38dc40ef52d882e08b2af71fc1b5413ac7009952.tar.xz
linux-38dc40ef52d882e08b2af71fc1b5413ac7009952.zip
batman-adv: do not silently ignore wrong condition
Only one neigh_node per orig_node should match a given neighbor address, therefore, if more than one matching neigh_node is found, a WARNING has to be triggered to let the user know that something is wrong in the originator state instead of silently skipping the error. Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv')
-rw-r--r--net/batman-adv/bat_iv_ogm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index 38183dc6965d..bd50e0d76aea 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
@@ -669,7 +669,7 @@ batadv_iv_ogm_orig_update(struct batadv_priv *bat_priv,
if (batadv_compare_eth(neigh_addr, ethhdr->h_source) &&
tmp_neigh_node->if_incoming == if_incoming &&
atomic_inc_not_zero(&tmp_neigh_node->refcount)) {
- if (neigh_node)
+ if (WARN(neigh_node, "too many matching neigh_nodes"))
batadv_neigh_node_free_ref(neigh_node);
neigh_node = tmp_neigh_node;
continue;