diff --git a/package/gluon-ebtables-limit-arp/src/gluon-arp-limiter.c b/package/gluon-ebtables-limit-arp/src/gluon-arp-limiter.c index af4acf48..cbb6faf2 100644 --- a/package/gluon-ebtables-limit-arp/src/gluon-arp-limiter.c +++ b/package/gluon-ebtables-limit-arp/src/gluon-arp-limiter.c @@ -248,6 +248,9 @@ static void ebt_tl_update(void) break; } + if (mac_is_multicast(&mac)) + continue; + ebt_add_mac(&mac); } diff --git a/package/gluon-ebtables-limit-arp/src/mac.h b/package/gluon-ebtables-limit-arp/src/mac.h index e6191736..11567ade 100644 --- a/package/gluon-ebtables-limit-arp/src/mac.h +++ b/package/gluon-ebtables-limit-arp/src/mac.h @@ -16,4 +16,9 @@ struct mac_addr { int mac_aton(const char *cp, struct mac_addr *mac); char *mac_ntoa(struct mac_addr *mac); +static inline int mac_is_multicast(struct mac_addr *addr) +{ + return addr->storage[0] & 0x01; +} + #endif /* _MAC_H_ */