Project

General

Profile

Actions

Bug #221

closed

Collision into tt hash tables

Added by Def D over 9 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
Start date:
07/24/2015
Due date:
% Done:

0%

Estimated time:

Description

Using maint branch

There is a collision in my batman network that counting 5 vlans.
A mac addr is not added into tt hash tables because the function batadv_compare_tt does not check vid of mac addr.
If a mac exist into several vlans (generaly true) , and the function batadv_choose_tt return the same hash for two couples of mac:vid, then only one is registred.

This patch work for me

static int batadv_compare_tt(const struct hlist_node *node, const void *data2)
{
        const void *data1 = container_of(node, struct batadv_tt_common_entry,
                                         hash_entry);

-       return batadv_compare_eth(data1, data2);
+       struct batadv_tt_common_entry* tt1 = data1;
+       struct batadv_tt_common_entry* tt2 = data2;
+
+       return (tt1->vid == tt2->vid) && batadv_compare_eth(data1, data2);
 }

Actions

Also available in: Atom PDF