aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2011-05-10 05:22:37 -0400
committerSven Eckelmann <sven@narfation.org>2011-05-30 01:39:37 -0400
commitbb899b89f46eb1fd6f62a4c360f6511b9714e479 (patch)
treeabe2a2d492ef3bc9028d6deb2822abdd21b3c92f /net/batman-adv
parent402196724816875d382099bedb09fdf1f57845bc (diff)
batman-adv: Ensure that we really have route changes in update_route
The debug output of update_route has tests for "route deleted" and "route added". All other situations are handled as "route changed". This is not true because neigh_node and curr_router could be both NULL. The function is not called in this situation, but the code might be interpreted wrong when reading it without this test. Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv')
-rw-r--r--net/batman-adv/routing.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
index 90ae6f0c30f3..368ceeba8145 100644
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -108,7 +108,7 @@ static void update_route(struct bat_priv *bat_priv, struct orig_node *orig_node,
108 tt_buff, tt_buff_len); 108 tt_buff, tt_buff_len);
109 109
110 /* route changed */ 110 /* route changed */
111 } else { 111 } else if (neigh_node && curr_router) {
112 bat_dbg(DBG_ROUTES, bat_priv, 112 bat_dbg(DBG_ROUTES, bat_priv,
113 "Changing route towards: %pM " 113 "Changing route towards: %pM "
114 "(now via %pM - was via %pM)\n", 114 "(now via %pM - was via %pM)\n",