Skip to content

Commit

Permalink
Merge pull request #828 from kernelkit/update-br-vlan-sep
Browse files Browse the repository at this point in the history
Verify that bridge vlan separation works properly for broadcast packets
  • Loading branch information
axkar authored Nov 25, 2024
2 parents 3d189d8 + 798194b commit 260d961
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
5 changes: 3 additions & 2 deletions test/case/ietf_interfaces/bridge_vlan_separation/Readme.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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 ] |
'------------------------------------------------------------------------------'
....
Expand All @@ -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


<<<
Expand Down
20 changes: 18 additions & 2 deletions test/case/ietf_interfaces/bridge_vlan_separation/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ] |
'------------------------------------------------------------------------------'
....
Expand Down Expand Up @@ -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()
2 changes: 1 addition & 1 deletion test/spec/Readme.adoc
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 260d961

Please sign in to comment.