From cfee1417fbc2455da144b32ba0e03e626c540859 Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Tue, 19 Jul 2022 00:49:30 +0200 Subject: [PATCH] if_vlan tests: Test changing vlan ID We can now change the vlan ID of an if_vlan interface without disassociating it from the parent interface. Test that this works. Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D35847 --- tests/sys/net/if_vlan.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/sys/net/if_vlan.sh b/tests/sys/net/if_vlan.sh index be1ec788c11d..96426254bb6d 100755 --- a/tests/sys/net/if_vlan.sh +++ b/tests/sys/net/if_vlan.sh @@ -29,6 +29,17 @@ basic_body() jexec singsing ifconfig ${vlan1} 10.0.0.2/24 up atf_check -s exit:0 -o ignore jexec singsing ping -c 1 10.0.0.1 + + # Test changing the vlan ID + atf_check -s exit:0 \ + jexec singsing ifconfig ${vlan1} vlandev ${epair_vlan}b vlan 43 + atf_check -s exit:2 -o ignore jexec singsing ping -c 1 10.0.0.1 + + # And change back + # Test changing the vlan ID + atf_check -s exit:0 \ + jexec singsing ifconfig ${vlan1} vlandev ${epair_vlan}b vlan 42 + atf_check -s exit:0 -o ignore jexec singsing ping -c 1 10.0.0.1 } basic_cleanup()