public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH next] batman-adv: use batadv_compare_eth instead of memcmp
@ 2012-11-18 11:52 Antonio Quartulli
  2012-11-18 20:23 ` Simon Wunderlich
  0 siblings, 1 reply; 3+ messages in thread
From: Antonio Quartulli @ 2012-11-18 11:52 UTC (permalink / raw)
  To: b.a.t.m.a.n

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>
---
 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)
-- 
1.8.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH next] batman-adv: use batadv_compare_eth instead of memcmp
  2012-11-18 11:52 [B.A.T.M.A.N.] [PATCH next] batman-adv: use batadv_compare_eth instead of memcmp Antonio Quartulli
@ 2012-11-18 20:23 ` Simon Wunderlich
  2012-11-19  3:44   ` Marek Lindner
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Wunderlich @ 2012-11-18 20:23 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

[-- Attachment #1: Type: text/plain, Size: 1386 bytes --]

Looks good.

Acked-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>

Thanks,
	Simon
On Sun, Nov 18, 2012 at 12:52:39PM +0100, Antonio Quartulli wrote:
> 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>
> ---
>  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)
> -- 
> 1.8.0
> 
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH next] batman-adv: use batadv_compare_eth instead of memcmp
  2012-11-18 20:23 ` Simon Wunderlich
@ 2012-11-19  3:44   ` Marek Lindner
  0 siblings, 0 replies; 3+ messages in thread
From: Marek Lindner @ 2012-11-19  3:44 UTC (permalink / raw)
  To: b.a.t.m.a.n

On Monday, November 19, 2012 04:23:53 Simon Wunderlich wrote:
>   Looks good.
> 
> Acked-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>

Applied in revision e8f5746.

Thanks,
Marek

--

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-11-19  3:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-18 11:52 [B.A.T.M.A.N.] [PATCH next] batman-adv: use batadv_compare_eth instead of memcmp Antonio Quartulli
2012-11-18 20:23 ` Simon Wunderlich
2012-11-19  3:44   ` Marek Lindner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox