Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Sep 2025 10:16:07 GMT
From:      Zhenlei Huang <zlei@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: b944c8ff1797 - main - tests: bridge: Add regression test for gif(4) interface as bridge member
Message-ID:  <202509011016.581AG7P4075331@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by zlei:

URL: https://cgit.FreeBSD.org/src/commit/?id=b944c8ff17971b1c8f61d5612eac146f5d589e87

commit b944c8ff17971b1c8f61d5612eac146f5d589e87
Author:     Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2025-09-01 10:14:22 +0000
Commit:     Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2025-09-01 10:14:22 +0000

    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
---
 tests/sys/net/if_bridge_test.sh | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

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()



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202509011016.581AG7P4075331>