batman-adv: use is_broadcast_ether_addr() instead of compare_eth(.., brd_addr)

Message ID 1305934387-25000-1-git-send-email-ordex@autistici.org (mailing list archive)
State Accepted, archived
Commit fe2a2e427da3764070b5a4d814484a3047be00cb
Headers

Commit Message

Antonio Quartulli May 20, 2011, 11:33 p.m. UTC
  Instead of comparing mac addresses with the broadcast address by means
of compare_eth(), the is_broadcast_ether_addr() kernel function has to be
used.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
 routing.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
  

Comments

Sven Eckelmann May 21, 2011, 7 a.m. UTC | #1
Antonio Quartulli wrote:
> Instead of comparing mac addresses with the broadcast address by means
> of compare_eth(), the is_broadcast_ether_addr() kernel function has to be
> used.
> 
> Signed-off-by: Antonio Quartulli <ordex@autistici.org>

Acked-by: Sven Eckelmann <sven@narfation.org>

> ---
>  routing.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/routing.c b/routing.c
> index 07f23ba..90ae6f0 100644
> --- a/routing.c
> +++ b/routing.c
> @@ -661,7 +661,7 @@ void receive_bat_packet(const struct ethhdr *ethhdr,
>  				hard_iface->net_dev->dev_addr))
>  			is_my_oldorig = 1;
> 
> -		if (compare_eth(ethhdr->h_source, broadcast_addr))
> +		if (is_broadcast_ether_addr(ethhdr->h_source))
>  			is_broadcast = 1;
>  	}
>  	rcu_read_unlock();
  
Marek Lindner May 22, 2011, 9:17 a.m. UTC | #2
On Saturday 21 May 2011 01:33:07 Antonio Quartulli wrote:
> Instead of comparing mac addresses with the broadcast address by means
> of compare_eth(), the is_broadcast_ether_addr() kernel function has to be
> used.

Applied in revision fe2a2e4.

Thanks,
Marek
  

Patch

diff --git a/routing.c b/routing.c
index 07f23ba..90ae6f0 100644
--- a/routing.c
+++ b/routing.c
@@ -661,7 +661,7 @@  void receive_bat_packet(const struct ethhdr *ethhdr,
 				hard_iface->net_dev->dev_addr))
 			is_my_oldorig = 1;
 
-		if (compare_eth(ethhdr->h_source, broadcast_addr))
+		if (is_broadcast_ether_addr(ethhdr->h_source))
 			is_broadcast = 1;
 	}
 	rcu_read_unlock();