diff mbox

[RFC,1/5] net: bridge - use is_multicast_ether_addr helper

Message ID 20090511125350.555985895@openvz.org
State RFC, archived
Delegated to: David Miller
Headers show

Commit Message

Cyrill Gorcunov May 11, 2009, 11:46 a.m. UTC
Instead of handwritten constrcution it's better 
to use is_multicast_ether_addr.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
---
 net/bridge/br_device.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Stephen Hemminger May 19, 2009, 10:18 p.m. UTC | #1
On Mon, 11 May 2009 15:46:40 +0400
Cyrill Gorcunov <gorcunov@openvz.org> wrote:

> Instead of handwritten constrcution it's better 
> to use is_multicast_ether_addr.
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
> ---
>  net/bridge/br_device.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: linux-2.6.git/net/bridge/br_device.c
> =====================================================================
> --- linux-2.6.git.orig/net/bridge/br_device.c
> +++ linux-2.6.git/net/bridge/br_device.c
> @@ -32,7 +32,7 @@ int br_dev_xmit(struct sk_buff *skb, str
>  	skb_reset_mac_header(skb);
>  	skb_pull(skb, ETH_HLEN);
>  
> -	if (dest[0] & 1)
> +	if (is_multicast_ether_addr(dest))
>  		br_flood_deliver(br, skb);
>  	else if ((dst = __br_fdb_get(br, dest)) != NULL)
>  		br_deliver(dst->dst, skb);
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


This is trivial and fine.
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

Index: linux-2.6.git/net/bridge/br_device.c
=====================================================================
--- linux-2.6.git.orig/net/bridge/br_device.c
+++ linux-2.6.git/net/bridge/br_device.c
@@ -32,7 +32,7 @@  int br_dev_xmit(struct sk_buff *skb, str
 	skb_reset_mac_header(skb);
 	skb_pull(skb, ETH_HLEN);
 
-	if (dest[0] & 1)
+	if (is_multicast_ether_addr(dest))
 		br_flood_deliver(br, skb);
 	else if ((dst = __br_fdb_get(br, dest)) != NULL)
 		br_deliver(dst->dst, skb);