diff options
| author | Zhenlei Huang <zlei@FreeBSD.org> | 2025-09-01 10:14:22 +0000 |
|---|---|---|
| committer | Zhenlei Huang <zlei@FreeBSD.org> | 2025-09-01 10:14:22 +0000 |
| commit | b944c8ff17971b1c8f61d5612eac146f5d589e87 (patch) | |
| tree | 19aeea560744424f98631c3e3394d95410cdfa09 | |
| parent | 1d12658755930e20904d498398379cad0e4ae396 (diff) | |
tests: bridge: Add regression test for gif(4) interface as bridge member
if_bridge(4) should not prohibit adding a gif(4) interface which is
assigned with IP addresses as a bridge member regardless of the setting
of sysctl variable net.link.bridge.member_ifaddrs.
Assigning IP addresses on the gif(4) interface should not be affected
no matter whether it is member of a bridge interface or not.
PR: 227450
Reported by: Siva Mahadevan <me@svmhdvn.name>
Reviewed by: ivy (previous version)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D52200
| -rwxr-xr-x | tests/sys/net/if_bridge_test.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/sys/net/if_bridge_test.sh b/tests/sys/net/if_bridge_test.sh index 0c19903714b1..b3405fd978c8 100755 --- a/tests/sys/net/if_bridge_test.sh +++ b/tests/sys/net/if_bridge_test.sh @@ -586,6 +586,25 @@ gif_body() jexec one ping -c 1 -s 1200 198.51.100.2 atf_check -s exit:0 -o ignore \ jexec one ping -c 1 -s 2000 198.51.100.2 + + # Assigning IP addresses on the gif tunneling interfaces + jexec one sysctl net.link.bridge.member_ifaddrs=1 + atf_check -s exit:0 -o ignore \ + jexec one ifconfig ${gif_one} 192.168.0.224/24 192.168.169.254 + atf_check -s exit:0 -o ignore \ + jexec one ifconfig ${gif_one} inet6 no_dad 2001:db8::1/64 + jexec one ifconfig ${bridge_one} deletem ${gif_one} + atf_check -s exit:0 -o ignore \ + jexec one ifconfig ${bridge_one} addm ${gif_one} + + jexec two sysctl net.link.bridge.member_ifaddrs=0 + atf_check -s exit:0 -o ignore \ + jexec two ifconfig ${gif_two} 192.168.169.254/24 192.168.0.224 + atf_check -s exit:0 -o ignore \ + jexec two ifconfig ${gif_two} inet6 no_dad 2001:db8::2/64 + jexec two ifconfig ${bridge_two} deletem ${gif_two} + atf_check -s exit:0 -o ignore \ + jexec two ifconfig ${bridge_two} addm ${gif_two} } gif_cleanup() |
