提交 88df8ef5 编写于 作者: S Stephen Hemminger 提交者: David S. Miller

[NET]: Don't exclude broadcast addresses from is_multicast_ether_addr()

The check for multicast shouldn't exclude broadcast type addresses.
This reverts the incorrect change done in 2.6.13.

The broadcast address is a multicast address and should be excluded
from being a valid_ether_address for use in bridging or device address.
Signed-off-by: NStephen Hemminger <shemminger@osdl.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 cd8787ab
...@@ -63,10 +63,11 @@ static inline int is_zero_ether_addr(const u8 *addr) ...@@ -63,10 +63,11 @@ static inline int is_zero_ether_addr(const u8 *addr)
* @addr: Pointer to a six-byte array containing the Ethernet address * @addr: Pointer to a six-byte array containing the Ethernet address
* *
* Return true if the address is a multicast address. * Return true if the address is a multicast address.
* By definition the broadcast address is also a multicast address.
*/ */
static inline int is_multicast_ether_addr(const u8 *addr) static inline int is_multicast_ether_addr(const u8 *addr)
{ {
return ((addr[0] != 0xff) && (0x01 & addr[0])); return (0x01 & addr[0]);
} }
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册