HomeFreeBSD

ifconfig: Redo fix vlan/vlanproto reconfiguration

Description

ifconfig: Redo fix vlan/vlanproto reconfiguration

When the if_vlan(4) interface has not been fully configured, i.e., a
bare interface without a physical interface associated with it,
retrieving the current settings of it and unconditionally overwriting
params will result in losing vlandev settings in params. That will
lead to failing to associate the if_vlan(4) interface with the requested
physical interface and the false report 'both vlan and vlandev must be
specified'.

Fix that by checking if the vlan interface has been fully configured.

The basic VLAN test is slightly modified to cover this case.

PR: 279181
Reviewed by: kp
Tested by: Mike Tancsa <mike@sentex.net>
Fixes: b82b8055ad44 ifconfig: fix vlan/vlanproto reconfiguration
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D45283

(cherry picked from commit 76df3c57a0abfd24652bfa33982ba136d9d0575b)

Details

Provenance
zleiAuthored on May 21 2024, 4:35 PM
Reviewer
rGb82b8055ad44: ifconfig: fix vlan/vlanproto reconfiguration
Differential Revision
D45283: ifconfig: redo fix vlan/vlanproto reconfiguration
Parents
rGc957e35ccbe9: autofs manuals: align lists, tag SPDX
Branches
Unknown
Tags
Unknown