Ignore our own multicast frames

Multicast on WiFi generally works by sending the packet unicast to the AP,
which then sends it back out to all stations (at a slow bitrate). Ignore
our own frames; they were causing us to spam mDNS as we responded to our
own queries, and they also break IPv6 Duplicate Address Detection.
This commit is contained in:
David Woodhouse
2024-09-02 14:29:01 +01:00
parent 4ee4d34758
commit 492a2f2dec

View File

@@ -200,6 +200,13 @@ ethernetif_input(int iface, struct pbuf *p)
/* points to packet payload, which starts with an Ethernet header */
ethhdr = p->payload;
/* Ignore our own multicast packets when they come back from the AP */
if ((ethhdr->dest.addr[0] & 0x01) /* multicast */ &&
!memcmp(ethhdr->src.addr, netif->hwaddr, ETH_HWADDR_LEN)) {
pbuf_free(p);
p = NULL;
return;
}
switch (htons(ethhdr->type))
{
/* IP or ARP packet? */