Commit 835437ae authored by Alessandro Rubini's avatar Alessandro Rubini

pfilter: accept unicast ARP frames

This commit removes the requirement for ARP frames to be broadcast
in the no-vlan case.  The simplified rule-set of a vlan setup already
accepts ARP unicast, and no harm is done.

Although we do not make ARP  requests so we won't receive unicast
replies, hosts do send unicast requests, to refresh an ARP entry
that is going to expire.

The next commit enacts this feature in software, as a side effect
of supporting pdelay PTP.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 2723ad02
......@@ -413,8 +413,8 @@ void pfilter_init_novlan(char *fname)
pfilter_cmp(11, 0x0011, 0x00ff, MOV, FRAME_UDP);
pfilter_logic2(FRAME_UDP, FRAME_UDP, AND, FRAME_IP_OK);
/* For CPU: arp broadcast or icmp unicast or ptp (or latency) */
pfilter_logic3(FRAME_FOR_CPU, FRAME_BROADCAST, AND, FRAME_TYPE_ARP, OR, FRAME_TYPE_PTP2);
/* For CPU: arp or icmp unicast or ptp (or latency) */
pfilter_logic2(FRAME_FOR_CPU, FRAME_TYPE_ARP, OR, FRAME_TYPE_PTP2);
pfilter_logic3(FRAME_FOR_CPU, FRAME_IP_OK, AND, FRAME_ICMP, OR, FRAME_FOR_CPU);
/* Now look in UDP ports: at offset 18 (14 + 20 + 8 = 36) */
......
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