Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=2077306
Signed-off-by: Dumitru Ceara <dce...@redhat.com>
---
 northd/northd.c         |  2 +-
 northd/ovn-northd.8.xml |  4 ++--
 tests/ovn.at            | 42 ++++++++++++++++++++++++++++++++++++++---
 3 files changed, 42 insertions(+), 6 deletions(-)

diff --git a/northd/northd.c b/northd/northd.c
index 0fcd3a642..facd41a59 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -8320,7 +8320,7 @@ build_lswitch_destination_lookup_bmcast(struct 
ovn_datapath *od,
              */
             ovn_lflow_add(lflows, od, S_SWITCH_IN_L2_LKUP, 85,
                           "ip4.mcast && ip4.dst == 224.0.0.0/24",
-                          "outport = \""MC_FLOOD"\"; output;");
+                          "outport = \""MC_FLOOD_L2"\"; output;");
 
             /* Flood all IPv6 multicast traffic destined to reserved
              * multicast IPs (RFC 4291, 2.7.1).
diff --git a/northd/ovn-northd.8.xml b/northd/ovn-northd.8.xml
index 3d1e7357d..ff21c0737 100644
--- a/northd/ovn-northd.8.xml
+++ b/northd/ovn-northd.8.xml
@@ -1678,8 +1678,8 @@ output;
 
       <li>
         A priority-85 flow that forwards all IP multicast traffic destined to
-        224.0.0.X to the <code>MC_FLOOD</code> multicast group, which
-        <code>ovn-northd</code> populates with all enabled logical ports.
+        224.0.0.X to the <code>MC_FLOOD_L2</code> multicast group, which
+        <code>ovn-northd</code> populates with all non-router logical ports.
       </li>
 
       <li>
diff --git a/tests/ovn.at b/tests/ovn.at
index 3ba6ced4e..dd84b03c9 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -24459,6 +24459,8 @@ AT_SETUP([interconnection - static multicast])
 #   ---------------------------------------------------------------------
 #                               |
 #                               |     +-- LR2 --- LS2 --- LSP2 (sender)
+#                               |     |            |
+#                               |     |            +----- LSP4 (receiver)
 #                               |    /
 #     LSP1  --- LS1 --- LR1 --- TS ---
 #   (receiver)                  |    \
@@ -24518,6 +24520,10 @@ check ovs-vsctl -- add-port br-int hv2-vif2 \
     -- set interface hv2-vif2 external-ids:iface-id=lsp3 \
        options:tx_pcap=hv2/vif2-tx.pcap \
        options:rxq_pcap=hv2/vif2-rx.pcap
+check ovs-vsctl -- add-port br-int hv2-vif3 \
+    -- set interface hv2-vif3 external-ids:iface-id=lsp4 \
+       options:tx_pcap=hv2/vif3-tx.pcap \
+       options:rxq_pcap=hv2/vif3-rx.pcap
 check ovs-vsctl set open . external-ids:ovn-is-interconn=true
 
 AT_CHECK([ovn-ic-nbctl create Transit_Switch name=ts], [0], [ignore])
@@ -24551,7 +24557,8 @@ check ovn-nbctl ls-add ls2 \
     -- lsp-set-addresses ls2-lr2 router \
     -- lsp-set-type ls2-lr2 router \
     -- lsp-set-options ls2-lr2 router-port=lr2-ls2 \
-    -- lsp-add ls2 lsp2
+    -- lsp-add ls2 lsp2 \
+    -- lsp-add ls2 lsp4
 check ovn-nbctl lsp-add ts ts-lr2 \
     -- lsp-set-addresses ts-lr2 router \
     -- lsp-set-type ts-lr2 router \
@@ -24600,9 +24607,10 @@ check ovn_as az2 ovn-nbctl --wait=hv sync
 OVN_POPULATE_ARP
 
 # Send an IP multicast packet from lsp2, it should be forwarded
-# statically to lsp1 and lsp3.
+# statically to lsp1, lsp3 and lsp4.
 > expected_az1
 > expected_az2
+> expected_az2_switched
 send_ip_multicast_pkt hv2-vif1 hv2 \
     000000000001 01005e000144 \
     $(ip_to_hex 44 44 44 2) $(ip_to_hex 239 0 1 68) 1e 20 7c6b 11 \
@@ -24615,10 +24623,38 @@ store_ip_multicast_pkt \
     000000020200 01005e000144 \
     $(ip_to_hex 44 44 44 2) $(ip_to_hex 239 0 1 68) 1e 1e 7e6b 11 \
     e518e518000aed350000 expected_az2
+store_ip_multicast_pkt \
+    000000000001 01005e000144 \
+    $(ip_to_hex 44 44 44 2) $(ip_to_hex 239 0 1 68) 1e 20 7c6b 11 \
+    e518e518000aed350000 expected_az2_switched
 
 OVS_WAIT_UNTIL(
   [check_packets 'hv1/vif1-tx.pcap expected_az1' \
-                 'hv2/vif2-tx.pcap expected_az2'],
+                 'hv2/vif2-tx.pcap expected_az2' \
+                 'hv2/vif3-tx.pcap expected_az2_switched'],
+  [$at_diff -F'^---' exp rcv])
+
+# Send an IP multicast packet from lsp2 towards 224.0.0.x, it should be
+# forwarded statically only to lsp3.
+as hv1 reset_pcap_file hv1-vif1 hv1/vif1
+as hv2 reset_pcap_file hv2-vif2 hv2/vif2
+as hv2 reset_pcap_file hv2-vif3 hv2/vif3
+> expected_az1
+> expected_az2
+> expected_az2_switched
+send_ip_multicast_pkt hv2-vif1 hv2 \
+    000000000001 01005e000144 \
+    $(ip_to_hex 44 44 44 2) $(ip_to_hex 224 0 0 1) 1e 20 8cae 11 \
+    e518e518000aed350000
+store_ip_multicast_pkt \
+    000000000001 01005e000144 \
+    $(ip_to_hex 44 44 44 2) $(ip_to_hex 224 0 0 1) 1e 20 8cae 11 \
+    e518e518000aed350000 expected_az2_switched
+
+OVS_WAIT_UNTIL(
+  [check_packets 'hv1/vif1-tx.pcap expected_az1' \
+                 'hv2/vif2-tx.pcap expected_az2' \
+                 'hv2/vif3-tx.pcap expected_az2_switched'],
   [$at_diff -F'^---' exp rcv])
 
 AT_CLEANUP
-- 
2.31.1

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to