opnsense-src/tests/sys/net
Lexi Winter 574cdcf929 bridge: fix vlan(4) on a bridge member
If an interface is a bridge member, and a vlan(4) is also created on
that interface, and net.link.bridge.member_ifaddrs=0, then vlan(4)
will never see any incoming frames because bridge doesn't pass them
to the host for processing.

Work around this by checking for locally-addressed frames using the
MAC address of the interface we received the frame on, but only if
the frame has a .1q tag and there's a vlan trunk on the interface.

This behaviour is almost certainly "wrong" and it's not clear if we
really want to support this, but it did work in the past and the
member_ifaddrs change was not supposed to break it, so this restores
the previous behaviour.

PR:	287150
MFC after:	1 week
Reviewed by:	kevans, des
Approved by:	kevans (mentor), des (mentor)
Differential Revision:	https://reviews.freebsd.org/D50623

(cherry picked from commit a5fe142e08447c7116b89159c110d02e860ac6a1)
2025-07-09 10:05:43 +02:00
..
if_ovpn if_ovpn: fix use-after-free of mbuf 2025-04-15 09:27:09 +02:00
routing Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
dhclient_pcp.conf net tests: basic test case for bpf(4)'s ability to set vlan pcp 2021-07-26 23:13:31 +02:00
if_bridge_test.sh bridge: fix vlan(4) on a bridge member 2025-07-09 10:05:43 +02:00
if_clone_test.sh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
if_epair.c Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
if_epair_test.sh spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
if_gif.sh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
if_lagg_test.sh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
if_stf.sh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
if_tun_test.sh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
if_vlan.sh if_vlan: handle VID conflicts 2024-10-11 12:04:09 +02:00
if_wg.sh kern: wg: remove overly-restrictive address family check 2025-03-14 21:52:02 -05:00
Makefile wg tests: Add a simple regression test case for netmap support 2024-05-20 09:42:46 -04:00
pcp.py netpfil tests: improve sniffer.py 2023-01-22 04:26:32 +01:00
randsleep.c Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
stp.py netpfil tests: improve sniffer.py 2023-01-22 04:26:32 +01:00