]> git.ipfire.org Git - thirdparty/hostap.git/commit
l2_packet_freebsd: Enable receiving priority tagged (VID=0) frames
authorR. Christian McDonald <rcm@rcm.sh>
Fri, 9 Jun 2023 16:27:12 +0000 (16:27 +0000)
committerJouni Malinen <j@w1.fi>
Sat, 28 Oct 2023 14:50:09 +0000 (17:50 +0300)
commit5b21f4861c2e729c38694af832ca4b13cca4bae9
tree52c8dc5c592893916f54ca01998f173f552f85d0
parent0aa44ccf826a22fc1d3e717c7960cec5a50bc142
l2_packet_freebsd: Enable receiving priority tagged (VID=0) frames

Certain internet service providers transmit VLAN 0 priority tagged
EAPOL frames from the ONT towards the residential gateway. VID 0
should be ignored, and the frame processed according to the priority
set in the 802.1P bits and the encapsulated EtherType (i.e., EAPOL).

The pcap filter utilized by l2_packet_* is inadquate for this use case.

Here we modify the pcap filter on FreeBSD to accept both unencapsulated
and encapsulated (with VLAN 0) EAPOL EtherTypes. This preserves the
original filter behavior while also matching on encapsulated EAPOL.

Additional work is required to support this handling on other platforms.

We also modify the rx_receive handler to offset the packet buffer
and length when handling dot1q encapsulated frames so the existing
packet parsing code works as-is.

Signed-off-by: R. Christian McDonald <rcm@rcm.sh>
Sponsored by: Rubicon Communications, LLC ("Netgate")
src/l2_packet/l2_packet_freebsd.c