We already have a helper function for the logic, so reuse it.

Signed-off-by: Han Zhou <[email protected]>
---
 northd/northd.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/northd/northd.c b/northd/northd.c
index 1e49301dd5b4..8f90e0ce4e04 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -12582,11 +12582,8 @@ build_arp_resolve_flows_for_lrouter_port(
         }
 
         for (size_t i = 0; i < op->od->n_router_ports; i++) {
-            const char *router_port_name = smap_get(
-                                &op->od->router_ports[i]->nbsp->options,
-                                "router-port");
-            struct ovn_port *router_port = ovn_port_find(ports,
-                                                         router_port_name);
+            struct ovn_port *router_port =
+                ovn_port_get_peer(ports, op->od->router_ports[i]);
             if (!router_port || !router_port->nbrp) {
                 continue;
             }
-- 
2.30.2

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

Reply via email to