diff options
author | Neale Ranns <nranns@cisco.com> | 2020-10-05 12:26:47 +0000 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2020-10-08 06:11:07 +0000 |
commit | 21fb4f71ee3824c8f177045f21fea258ece602a9 (patch) | |
tree | 8ef415f172df0de141a11169cfbbd87072a0aa54 /test | |
parent | 27c35e30569c3904e977e7f841b8bc56f16aeb9f (diff) |
fib: Register multicast MAC with interface for accepting interfaces
Type: fix
Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: Ic6c76b65e2dcc08916373153944507a297c962c0
Diffstat (limited to 'test')
-rw-r--r-- | test/test_ip_mcast.py | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/test/test_ip_mcast.py b/test/test_ip_mcast.py index d7a8238e35b..64d37060d43 100644 --- a/test/test_ip_mcast.py +++ b/test/test_ip_mcast.py @@ -95,7 +95,7 @@ class TestIPMcast(VppTestCase): def create_stream_ip4(self, src_if, src_ip, dst_ip, payload_size=0): pkts = [] # default to small packet sizes - p = (Ether(dst=src_if.local_mac, src=src_if.remote_mac) / + p = (Ether(dst=getmacbyip(dst_ip), src=src_if.remote_mac) / IP(src=src_ip, dst=dst_ip) / UDP(sport=1234, dport=1234)) if not payload_size: @@ -111,7 +111,7 @@ class TestIPMcast(VppTestCase): for i in range(0, N_PKTS_IN_STREAM): info = self.create_packet_info(src_if, src_if) payload = self.info_to_payload(info) - p = (Ether(dst=src_if.local_mac, src=src_if.remote_mac) / + p = (Ether(dst=getmacbyip6(dst_ip), src=src_if.remote_mac) / IPv6(src=src_ip, dst=dst_ip) / UDP(sport=1234, dport=1234) / Raw(payload)) @@ -189,6 +189,14 @@ class TestIPMcast(VppTestCase): # a stream that matches the default route. gets dropped. # self.vapi.cli("clear trace") + self.vapi.cli("packet mac-filter pg0 on") + self.vapi.cli("packet mac-filter pg1 on") + self.vapi.cli("packet mac-filter pg2 on") + self.vapi.cli("packet mac-filter pg4 on") + self.vapi.cli("packet mac-filter pg5 on") + self.vapi.cli("packet mac-filter pg6 on") + self.vapi.cli("packet mac-filter pg7 on") + tx = self.create_stream_ip4(self.pg0, "1.1.1.1", "232.1.1.1") self.pg0.add_stream(tx) @@ -395,9 +403,24 @@ class TestIPMcast(VppTestCase): self.pg0.assert_nothing_captured( remark="IP multicast packets forwarded on PG0") + self.vapi.cli("packet mac-filter pg0 off") + self.vapi.cli("packet mac-filter pg1 off") + self.vapi.cli("packet mac-filter pg2 off") + self.vapi.cli("packet mac-filter pg4 off") + self.vapi.cli("packet mac-filter pg5 off") + self.vapi.cli("packet mac-filter pg6 off") + self.vapi.cli("packet mac-filter pg7 off") + def test_ip6_mcast(self): """ IPv6 Multicast Replication """ + self.vapi.cli("packet mac-filter pg0 on") + self.vapi.cli("packet mac-filter pg1 on") + self.vapi.cli("packet mac-filter pg2 on") + self.vapi.cli("packet mac-filter pg4 on") + self.vapi.cli("packet mac-filter pg5 on") + self.vapi.cli("packet mac-filter pg6 on") + self.vapi.cli("packet mac-filter pg7 on") # # a stream that matches the default route. gets dropped. # @@ -556,6 +579,14 @@ class TestIPMcast(VppTestCase): self.pg3.assert_nothing_captured( remark="IP multicast packets forwarded on PG3") + self.vapi.cli("packet mac-filter pg0 off") + self.vapi.cli("packet mac-filter pg1 off") + self.vapi.cli("packet mac-filter pg2 off") + self.vapi.cli("packet mac-filter pg4 off") + self.vapi.cli("packet mac-filter pg5 off") + self.vapi.cli("packet mac-filter pg6 off") + self.vapi.cli("packet mac-filter pg7 off") + def _mcast_connected_send_stream(self, dst_ip): self.vapi.cli("clear trace") tx = self.create_stream_ip4(self.pg0, |