HomeFreeBSD

bridge: distinguish no vlan and vlan 1

Description

bridge: distinguish no vlan and vlan 1

The bridge treated no vlan tag as being equivalent to vlan ID 1, which
causes confusion if the bridge sees both untagged and vlan 1 tagged
traffic.

Use DOT1Q_VID_NULL when there's no tag, and fix up the lookup code by
using 'DOT1Q_VID_RSVD_IMPL' to mean 'any vlan', rather than vlan 0. Note
that we have to account for userspace expecting to use 0 as meaning 'any
vlan'.

PR: 270559
Suggested by: Zhenlei Huang <zlei@FreeBSD.org>
Reviewed by: philip, zlei
Differential Revision: https://reviews.freebsd.org/D39478

Details

Provenance
kpAuthored on Apr 7 2023, 4:00 PM
Reviewer
philip
Differential Revision
D39478: bridge: distinguish no vlan and vlan 1
Parents
rG9af6f4268ac3: bridge: Use the %D identifier to format MAC address
Branches
Unknown
Tags
Unknown