aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv
diff options
context:
space:
mode:
authorAntonio Quartulli <ordex@autistici.org>2011-10-12 08:54:50 -0400
committerSven Eckelmann <sven@narfation.org>2011-11-20 07:08:32 -0500
commiteb7e2a1e20488f91c7007caa080b83b8e4222572 (patch)
tree8b3f1f04f96551a049edb3cfc3e299822b7c1bb4 /net/batman-adv
parentbe7af5cf9cae5e088a9783ccd6e47469ce9d43f4 (diff)
batman-adv: use orig_hash_find() instead of get_orig_node() in TT code
get_orig_node() tries to retrieve an orig_node object based on a mac address and creates it if not present. This is not the wanted behaviour in the translation table code as we don't want to create new orig_code objects but expect a NULL pointer if the object does not exist. Reported-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv')
-rw-r--r--net/batman-adv/translation-table.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index 1db9d96109a1..7ab9d72ce978 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -1188,11 +1188,11 @@ static bool send_other_tt_response(struct bat_priv *bat_priv,
1188 (tt_request->flags & TT_FULL_TABLE ? 'F' : '.')); 1188 (tt_request->flags & TT_FULL_TABLE ? 'F' : '.'));
1189 1189
1190 /* Let's get the orig node of the REAL destination */ 1190 /* Let's get the orig node of the REAL destination */
1191 req_dst_orig_node = get_orig_node(bat_priv, tt_request->dst); 1191 req_dst_orig_node = orig_hash_find(bat_priv, tt_request->dst);
1192 if (!req_dst_orig_node) 1192 if (!req_dst_orig_node)
1193 goto out; 1193 goto out;
1194 1194
1195 res_dst_orig_node = get_orig_node(bat_priv, tt_request->src); 1195 res_dst_orig_node = orig_hash_find(bat_priv, tt_request->src);
1196 if (!res_dst_orig_node) 1196 if (!res_dst_orig_node)
1197 goto out; 1197 goto out;
1198 1198
@@ -1318,7 +1318,7 @@ static bool send_my_tt_response(struct bat_priv *bat_priv,
1318 my_ttvn = (uint8_t)atomic_read(&bat_priv->ttvn); 1318 my_ttvn = (uint8_t)atomic_read(&bat_priv->ttvn);
1319 req_ttvn = tt_request->ttvn; 1319 req_ttvn = tt_request->ttvn;
1320 1320
1321 orig_node = get_orig_node(bat_priv, tt_request->src); 1321 orig_node = orig_hash_find(bat_priv, tt_request->src);
1322 if (!orig_node) 1322 if (!orig_node)
1323 goto out; 1323 goto out;
1324 1324