opnsense-src/tests/sys/net
Zhenlei Huang c9188db6f9 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:		b82b8055ad ifconfig: fix vlan/vlanproto reconfiguration
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D45283

(cherry picked from commit 76df3c57a0abfd24652bfa33982ba136d9d0575b)
2024-05-25 00:03:02 +08:00
..
if_ovpn if_ovpn: cope with loops 2024-05-20 09:39:52 +02:00
routing Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
dhclient_pcp.conf net tests: basic test case for bpf(4)'s ability to set vlan pcp 2021-07-26 23:13:31 +02:00
if_bridge_test.sh libifconfig: Fix bridge status member list 2024-01-28 18:55:56 +01:00
if_clone_test.sh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
if_epair.c Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
if_epair_test.sh spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
if_gif.sh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
if_lagg_test.sh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
if_stf.sh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
if_tun_test.sh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
if_vlan.sh ifconfig: Redo fix vlan/vlanproto reconfiguration 2024-05-25 00:03:02 +08:00
if_wg.sh wg tests: Add a simple regression test case for netmap support 2024-05-20 09:42:46 -04:00
Makefile wg tests: Add a simple regression test case for netmap support 2024-05-20 09:42:46 -04:00
pcp.py netpfil tests: improve sniffer.py 2023-01-22 04:26:32 +01:00
randsleep.c Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
stp.py netpfil tests: improve sniffer.py 2023-01-22 04:26:32 +01:00