This should be 4094 (0xFFE), not 4095 (0xFFF), since 0xFFF is not a
valid VID.
MFC after: 3 days
Fixes: c59492025073 ("sys/net: add DOT1Q_VID_{MIN,MAX}")
Differential D50576
if_vlan_var.h: fix value of DOT1Q_VID_MAX ivy on May 28 2025, 3:15 PM. Authored by Tags None Referenced Files
Details
This should be 4094 (0xFFE), not 4095 (0xFFF), since 0xFFF is not a MFC after: 3 days
Diff Detail
Event TimelineComment Actions We do use it in vlan_clone_create_nl() during validation, presumably to ensure we only create valid VLANs. That's a user-visible change, but it's a bug fix so I don't think that should stop us. 802.1Q says (about VID 0xffff): "Reserved for implementation use. This VID value shall not be configured as a PVID or a member of a VID Set, or transmitted in a tag header." Comment Actions i tested, you can't actually create such a vlan because there's an explicit check against 0xfff elsewhere. test1# ifconfig epair1a.4095 create ifconfig: invalid vlan tag test1# ifconfig vlan4095 create vlandev epair1a vlan 4095 ifconfig: SIOCIFCREATE2 (vlan4095): Invalid argument in fact this is checked in about 3 different places, which might be worth fixing at some point... Comment Actions Ah, indeed. I didn't read quite far enough in the code. So this isn't user-visible, which makes it even easier to change. It'll save us a lot of work in that case though, so it's still an improvement. |