git: 1e824ee84f46 - main - if_bridge tests: test adding interfaces with different MTU
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 27 Jun 2022 08:28:30 UTC
The branch main has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=1e824ee84f46b4a086bc3c7c528c0762e388bc66
commit 1e824ee84f46b4a086bc3c7c528c0762e388bc66
Author: Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2022-06-25 11:47:31 +0000
Commit: Kristof Provost <kp@FreeBSD.org>
CommitDate: 2022-06-27 06:27:28 +0000
if_bridge tests: test adding interfaces with different MTU
We now allow new bridge members to be added with a different MTU from
the bridge. We change the interface MTU to match the bridge.
Test this.
PR: 264883
---
tests/sys/net/if_bridge_test.sh | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/tests/sys/net/if_bridge_test.sh b/tests/sys/net/if_bridge_test.sh
index 4cc935ceefa8..275a3bae5841 100755
--- a/tests/sys/net/if_bridge_test.sh
+++ b/tests/sys/net/if_bridge_test.sh
@@ -558,9 +558,6 @@ mtu_body()
atf_check -s exit:0 \
ifconfig ${bridge} addm ${epair}a
- # Can't add an interface with an MTU mismatch
- atf_check -s exit:1 -e ignore \
- ifconfig ${bridge} addm ${gif}
ifconfig ${gif} mtu 1500
atf_check -s exit:0 \
@@ -586,6 +583,17 @@ mtu_body()
atf_check -s exit:1 -e ignore \
ifconfig ${epair}a mtu 1900
check_mtu ${epair}a 2000
+
+ # Test adding an interface with a different MTU
+ new_epair=$(vnet_mkepair)
+ check_mtu ${new_epair}a 1500
+ atf_check -s exit:0 -e ignore \
+ ifconfig ${bridge} addm ${new_epair}a
+
+ check_mtu ${bridge} 2000
+ check_mtu ${gif} 2000
+ check_mtu ${epair}a 2000
+ check_mtu ${new_epair}a 2000
}
mtu_cleanup()