VLAN Identifier number 0xFFF is reserved.
Also validate during parsing to prevent potential integer overflow.
Fixes: c7cffd65c5d85 Add support for stacked VLANs (IEEE 802.1ad, AKA Q-in-Q)
MFC after: 1 week
Differential D39282
ifconfig: Improve VLAN Identifier number parsing zlei on Mar 27 2023, 9:17 AM. Authored by Tags None Referenced Files
Subscribers
Details
VLAN Identifier number 0xFFF is reserved. Also validate during parsing to prevent potential integer overflow. Fixes: c7cffd65c5d85 Add support for stacked VLANs (IEEE 802.1ad, AKA Q-in-Q) root@:~ # ifconfig em0.4095 create ifconfig: invalid vlan tag # ifconfig epair create name e e # ifconfig e.4294967297 create ifconfig: invalid vlan tag
Diff Detail
Event TimelineComment Actions Conceptually LGTM, please see an implementation comment inline.
Comment Actions Use unsigned int for vid. Inspired by @melifaro 's comment:
|