This reverts commit 06ac2fc6518db20f5b88f73d5d0c89e369e8084b.

Commit [1] caused issues with handling ARP requests to vif ports inside
switch that has connectivity to the external network through a localnet port,
as well as many other problems, so it was suggested to revert the commit.
This commit was part of a fixes for this broken commit.

[1] 
https://github.com/ovn-org/ovn/commit/1b4058b9162c27edc6bd42c3dedbef622e2fd0a7
Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2026-May/431983.html
Signed-off-by: Alexandra Rukomoinikova <[email protected]>
---
 northd/northd.c |  4 +---
 tests/ovn.at    | 20 +++++++-------------
 2 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/northd/northd.c b/northd/northd.c
index 4162143de..11e626a49 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -10193,8 +10193,6 @@ build_lswitch_arp_chassis_resident(const struct 
ovn_datapath *od,
         struct ovn_port *op_r = op->peer;
 
         if (lrp_is_l3dgw(op_r)) {
-            hmapx_add(&resident_ports, op_r->cr_port);
-        } else if (op_r->od->is_gw_router) {
             hmapx_add(&resident_ports, op_r);
         }
     }
@@ -10220,7 +10218,7 @@ build_lswitch_arp_chassis_resident(const struct 
ovn_datapath *od,
             ds_put_format(&match, REGBIT_EXT_ARP" == 1");
             if (od_is_centralized(op->od)) {
                 ds_put_format(&match, " && is_chassis_resident(%s)",
-                              op->json_key);
+                              op->cr_port->json_key);
             }
             ovn_lflow_add(lflows, od, S_SWITCH_IN_APPLY_PORT_SEC, 75,
                           ds_cstr(&match), "next;", ar->lflow_ref);
diff --git a/tests/ovn.at b/tests/ovn.at
index fcbb192cb..7a7121c4f 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -31543,6 +31543,13 @@ check ovn-nbctl lrp-set-gateway-chassis lr0-public hv1 
20
 
 # Create NAT entries for the ports
 
+# sw0-port1
+check ovn-nbctl lr-nat-add lr0 dnat_and_snat 172.16.0.110 10.0.0.3 sw0-port1 
30:54:00:00:00:03
+check ovn-nbctl lr-nat-add lr0 dnat_and_snat 3000::c 1000::3 sw0-port1 
40:54:00:00:00:03
+# sw1-port1
+check ovn-nbctl lr-nat-add lr0 dnat_and_snat 172.16.0.120 20.0.0.3 sw1-port1 
30:54:00:00:00:04
+check ovn-nbctl lr-nat-add lr0 dnat_and_snat 3000::d 2000::3 sw1-port1 
40:54:00:00:00:04
+
 # Add snat entriess
 check ovn-nbctl lr-nat-add lr0 snat 172.16.0.100 10.0.0.0/24
 check ovn-nbctl lr-nat-add lr0 snat 172.16.0.101 10.0.0.10
@@ -31651,19 +31658,6 @@ test_arp_response 000020201213 $(ip_to_hex 172 16 0 
102) hv1 hv2 hv3
 test_arp_response 000030303233 $(ip_to_hex 172 16 0 200) hv3 hv1 hv2
 test_arp_response 000030303233 $(ip_to_hex 172 16 0 201) hv3 hv1 hv2
 
-# Add some extra dnat_and_snat, that should generate extra flows for external 
ARPs.
-# sw0-port1
-check ovn-nbctl lr-nat-add lr0 dnat_and_snat 172.16.0.110 10.0.0.3 sw0-port1 
30:54:00:00:00:03
-check ovn-nbctl lr-nat-add lr0 dnat_and_snat 3000::c 1000::3 sw0-port1 
40:54:00:00:00:03
-# sw1-port1
-check ovn-nbctl lr-nat-add lr0 dnat_and_snat 172.16.0.120 20.0.0.3 sw1-port1 
30:54:00:00:00:04
-check ovn-nbctl lr-nat-add lr0 dnat_and_snat 3000::d 2000::3 sw1-port1 
40:54:00:00:00:04
-check ovn-nbctl --wait=hv sync
-
-# Send ARP request for the IP which belongs to gw_router
-test_arp_response 000030303233 $(ip_to_hex 172 16 0 200) hv3 hv1 hv2
-test_arp_response 000030303233 $(ip_to_hex 172 16 0 201) hv3 hv1 hv2
-
 # Make hv3 claim the cr-lr0-public
 check ovn-nbctl lrp-set-gateway-chassis lr0-public hv1 20
 check ovn-nbctl lrp-set-gateway-chassis lr0-public hv2 30
-- 
2.48.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to