Repository : ssh://git@open-mesh.org/batman-adv
On branch : next
commit e8f5746f6d638d2e9e08596f312652dbe453284f Author: Antonio Quartulli ordex@autistici.org Date: Sun Nov 18 12:52:39 2012 +0100
batman-adv: use batadv_compare_eth instead of memcmp
When comparing ethernet address the batadv_compare_eth function has to be used instead of memcmp.
This was introduced by 923d5d148cdd0928c9c5f8e0e2024f585dcf6efd ("batman-adv: fix bla compare function")
Signed-off-by: Antonio Quartulli ordex@autistici.org Acked-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de Signed-off-by: Marek Lindner lindner_marek@yahoo.de
e8f5746f6d638d2e9e08596f312652dbe453284f bridge_loop_avoidance.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bridge_loop_avoidance.c b/bridge_loop_avoidance.c index fc56ea2..5aebe93 100644 --- a/bridge_loop_avoidance.c +++ b/bridge_loop_avoidance.c @@ -79,7 +79,7 @@ static int batadv_compare_backbone_gw(const struct hlist_node *node, hash_entry); const struct batadv_backbone_gw *gw1 = data1, *gw2 = data2;
- if (memcmp(gw1->orig, gw2->orig, ETH_ALEN)) + if (!batadv_compare_eth(gw1->orig, gw2->orig)) return 0;
if (gw1->vid != gw2->vid) @@ -96,7 +96,7 @@ static int batadv_compare_claim(const struct hlist_node *node, hash_entry); const struct batadv_claim *cl1 = data1, *cl2 = data2;
- if (memcmp(cl1->addr, cl2->addr, ETH_ALEN)) + if (!batadv_compare_eth(cl1->addr, cl2->addr)) return 0;
if (cl1->vid != cl2->vid)