Commit 7f668484 authored by Alessandro Rubini's avatar Alessandro Rubini

net: ignore macaddress in matching received frames

A WR socket registers using a specific mac address and the receiving code
uses the mac address to match the frame.  This is going to be a problem
with the new PTP code, as pdelay frames use a different mcast mac address.
Moreover, if we go to UDP, stuff gets worse.

Packet filter rules are already in place for the new mac addresses, and
we now need to relax the checking in the software stack.

As a side effect, we avoid a number of broadcast frames, because wrpc-sw
now replies to unicast ARP requests.

What happened before:

   16:27:07 00:0b:ab:7c:8e:4a > 00:26:7b:00:04:18 who-has ...107 tell ...200
   16:27:08 00:0b:ab:7c:8e:4a > 00:26:7b:00:04:18 who-has ...107 tell ...200
   16:27:09 00:0b:ab:7c:8e:4a > 00:26:7b:00:04:18 who-has ...107 tell ...200
   16:27:12 00:0b:ab:7c:8e:4a > ff:ff:ff:ff:ff:ff who-has ...107 tell ...200
   16:27:12 00:26:7b:00:04:18 > 00:0b:ab:7c:8e:4a ...107 is-at 00:26:7b:00:04:18

what happens now:

   16:42:27 00:0b:ab:7c:8e:4a > 00:26:7b:00:04:18 who-has ...107 tell ...200
   16:42:27 00:26:7b:00:04:18 > 00:0b:ab:7c:8e:4a ...107 is-at 00:26:7b:00:04:18
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 835437ae
......@@ -353,8 +353,6 @@ static int update_rx_queues(void)
s = socks[i];
if (!s)
continue;
if (memcmp(hdr.dstmac, s->bind_addr.mac, 6))
continue;
if (hdr.ethtype != s->bind_addr.ethertype)
continue;
if (!port && !s->bind_addr.udpport)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment