diff options
author | Simon Wunderlich <simon@open-mesh.com> | 2013-05-28 05:49:47 -0400 |
---|---|---|
committer | Antonio Quartulli <antonio@meshcoding.com> | 2013-10-12 11:17:10 -0400 |
commit | 56a5ca8409072d9d982d0904f60a4a6096d2dec0 (patch) | |
tree | 7e3a46b4033ea1d391420ffb53adf8464521fdbf /net/batman-adv | |
parent | 411d6ed93a5d0601980d3e5ce75de07c98e3a7de (diff) |
batman-adv: remove useless find_router look up
This is not used anymore with the new fragmentation, and it might
actually mess up the bonding code because find_router() assumes it
is only called once per packet.
Signed-off-by: Simon Wunderlich <simon@open-mesh.com>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
Diffstat (limited to 'net/batman-adv')
-rw-r--r-- | net/batman-adv/send.c | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c index 4bbcf51db6a7..82588e425641 100644 --- a/net/batman-adv/send.c +++ b/net/batman-adv/send.c | |||
@@ -250,30 +250,19 @@ int batadv_send_skb_generic_unicast(struct batadv_priv *bat_priv, | |||
250 | struct ethhdr *ethhdr = (struct ethhdr *)skb->data; | 250 | struct ethhdr *ethhdr = (struct ethhdr *)skb->data; |
251 | struct batadv_unicast_packet *unicast_packet; | 251 | struct batadv_unicast_packet *unicast_packet; |
252 | struct batadv_orig_node *orig_node; | 252 | struct batadv_orig_node *orig_node; |
253 | struct batadv_neigh_node *neigh_node; | ||
254 | int ret = NET_RX_DROP; | 253 | int ret = NET_RX_DROP; |
255 | 254 | ||
256 | /* get routing information */ | 255 | /* get routing information */ |
257 | if (is_multicast_ether_addr(ethhdr->h_dest)) { | 256 | if (is_multicast_ether_addr(ethhdr->h_dest)) |
258 | orig_node = batadv_gw_get_selected_orig(bat_priv); | 257 | orig_node = batadv_gw_get_selected_orig(bat_priv); |
259 | if (orig_node) | 258 | else |
260 | goto find_router; | 259 | /* check for tt host - increases orig_node refcount. |
261 | } | 260 | * returns NULL in case of AP isolation |
262 | 261 | */ | |
263 | /* check for tt host - increases orig_node refcount. | 262 | orig_node = batadv_transtable_search(bat_priv, ethhdr->h_source, |
264 | * returns NULL in case of AP isolation | 263 | ethhdr->h_dest); |
265 | */ | ||
266 | orig_node = batadv_transtable_search(bat_priv, ethhdr->h_source, | ||
267 | ethhdr->h_dest); | ||
268 | |||
269 | find_router: | ||
270 | /* find_router(): | ||
271 | * - if orig_node is NULL it returns NULL | ||
272 | * - increases neigh_nodes refcount if found. | ||
273 | */ | ||
274 | neigh_node = batadv_find_router(bat_priv, orig_node, NULL); | ||
275 | 264 | ||
276 | if (!neigh_node) | 265 | if (!orig_node) |
277 | goto out; | 266 | goto out; |
278 | 267 | ||
279 | switch (packet_type) { | 268 | switch (packet_type) { |
@@ -305,8 +294,6 @@ find_router: | |||
305 | ret = 0; | 294 | ret = 0; |
306 | 295 | ||
307 | out: | 296 | out: |
308 | if (neigh_node) | ||
309 | batadv_neigh_node_free_ref(neigh_node); | ||
310 | if (orig_node) | 297 | if (orig_node) |
311 | batadv_orig_node_free_ref(orig_node); | 298 | batadv_orig_node_free_ref(orig_node); |
312 | if (ret == NET_RX_DROP) | 299 | if (ret == NET_RX_DROP) |