From 798194b64a70a60a070ed55eb1ba2d49ccead44f Mon Sep 17 00:00:00 2001 From: Ahmed Karic Date: Thu, 21 Nov 2024 11:08:31 +0100 Subject: [PATCH] test: update bridge vlan separation test - Verify that broadcast packets are also properly moved accross the bridge, i.e. the broadcast packets sent from vlan interface VLAN10 do not reach VLAN20 Fixes #773 --- .../bridge_vlan_separation/Readme.adoc | 5 +++-- .../bridge_vlan_separation/test.py | 20 +++++++++++++++++-- test/spec/Readme.adoc | 2 +- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/test/case/ietf_interfaces/bridge_vlan_separation/Readme.adoc b/test/case/ietf_interfaces/bridge_vlan_separation/Readme.adoc index 459f8ebe0..4345a4956 100644 --- a/test/case/ietf_interfaces/bridge_vlan_separation/Readme.adoc +++ b/test/case/ietf_interfaces/bridge_vlan_separation/Readme.adoc @@ -14,9 +14,9 @@ Test that two VLANs are correctly separated in the bridge ,------------------------------------------------------------------------------, | host:mgmt0 host:data10 host:data11 host:data20 host:data21 host:mgmt1 | | [10.0.0.1] [10.0.0.2] [10.0.0.3] [10.0.0.4] | - | (ns10) (ns11) (s20) (ns21) | + | (ns10) (ns11) (ns20) (ns21) | | | - | [ HOST ] | + | [ HOST ] | '------------------------------------------------------------------------------' .... @@ -39,6 +39,7 @@ endif::topdoc[] . Verify ping 10.0.0.3 from host:data10 . Verify ping 10.0.0.4 from host:data11 . Verify ping not possible host:data10->10.0.0.4, host:data11->10.0.0.3, host:data10->10.0.0.2, host:data11->10.0.0.1 +. Verify MAC broadcast isolation within VLANs <<< diff --git a/test/case/ietf_interfaces/bridge_vlan_separation/test.py b/test/case/ietf_interfaces/bridge_vlan_separation/test.py index 78dd71d94..68baaa057 100755 --- a/test/case/ietf_interfaces/bridge_vlan_separation/test.py +++ b/test/case/ietf_interfaces/bridge_vlan_separation/test.py @@ -16,9 +16,9 @@ ,------------------------------------------------------------------------------, | host:mgmt0 host:data10 host:data11 host:data20 host:data21 host:mgmt1 | | [10.0.0.1] [10.0.0.2] [10.0.0.3] [10.0.0.4] | - | (ns10) (ns11) (s20) (ns21) | + | (ns10) (ns11) (ns20) (ns21) | | | - | [ HOST ] | + | [ HOST ] | '------------------------------------------------------------------------------' .... @@ -168,5 +168,21 @@ lambda: ns11.must_not_reach("10.0.0.3"), lambda: ns10.must_not_reach("10.0.0.2"), lambda: ns11.must_not_reach("10.0.0.1")) + + with test.step("Verify MAC broadcast isolation within VLANs"): + # Clear ARP entries/queued packets + ns10.runsh("ip neigh flush all") + ns11.runsh("ip neigh flush all") + ns20.runsh("ip neigh flush all") + ns21.runsh("ip neigh flush all") + + lambda: ns10.runsh("ping -b -c 5 -i 0.5 10.0.0.255"), + + lambda: ns20.must_receive("broadcast or arp"), + + infamy.parallel( + lambda: ns11.must_not_receive("broadcast or arp"), + lambda: ns21.must_not_receive("broadcast or arp") + ) test.succeed() diff --git a/test/spec/Readme.adoc b/test/spec/Readme.adoc index 05c69ad1b..511f1250f 100644 --- a/test/spec/Readme.adoc +++ b/test/spec/Readme.adoc @@ -1,7 +1,7 @@ :topdoc: = Test specification -Infix v24.10.1-23-g8fc0ab9b-dirty + v24.10.2-2-g032a51b9-dirty :title-page: :toc: :toclevels: 2