mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-18 10:54:03 -05:00
Add is_multicast_ether_addr()
This helper function can be used to check whether a MAC address is a multicast (including broadcast) address. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
ee1e3f57b5
commit
36209df93a
@ -518,6 +518,11 @@ static inline int is_broadcast_ether_addr(const u8 *a)
|
|||||||
return (a[0] & a[1] & a[2] & a[3] & a[4] & a[5]) == 0xff;
|
return (a[0] & a[1] & a[2] & a[3] & a[4] & a[5]) == 0xff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int is_multicast_ether_addr(const u8 *a)
|
||||||
|
{
|
||||||
|
return a[0] & 0x01;
|
||||||
|
}
|
||||||
|
|
||||||
#define broadcast_ether_addr (const u8 *) "\xff\xff\xff\xff\xff\xff"
|
#define broadcast_ether_addr (const u8 *) "\xff\xff\xff\xff\xff\xff"
|
||||||
|
|
||||||
#include "wpa_debug.h"
|
#include "wpa_debug.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user