HomeFreeBSD

if_vlan: handle VID conflicts

Description

if_vlan: handle VID conflicts

If we fail to change the vlan id we have to undo the removal (and vlan id
change) in the error path. Otherwise we'll have removed the vlan object from the
hash table, and have the wrong vlan id as well. Subsequent modification attempts
will then try to remove an entry which doesn't exist, and panic.

Undo the vlan id modification if the insertion in the hash table fails, and
re-insert it under the original vlan id.

PR: 279195
Reviewed by: zlei
MFC atfer: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D45285

Details

Provenance
kpAuthored on May 21 2024, 11:31 AM
Reviewer
zlei
Differential Revision
D45285: if_vlan: handle VID conflicts
Parents
rG6e824f371301: time: siginfo_recvd needs to be marked volatile
Branches
Unknown
Tags
Unknown