diff --git a/ovn/northd/ovn-northd.8.xml b/ovn/northd/ovn-northd.8.xml
index fa7675b603a..1b2912e163e 100644
--- a/ovn/northd/ovn-northd.8.xml
+++ b/ovn/northd/ovn-northd.8.xml
@@ -204,9 +204,12 @@
-
- Priority-150 flows that matches ARP requests to each known IP address
- A of logical port P, and respond ARP replies
- directly with corresponding Ethernet address E:
+
+ Priority-150 flows that matches ARP requests to each known IP address
+ A of logical port P, and respond with ARP
+ replies directly with corresponding Ethernet address E:
+
+
eth.dst = eth.src;
eth.src = E;
@@ -219,6 +222,11 @@ outport = P;
inport = ""; /* Allow sending out inport. */
output;
+
+
+ These flows are omitted for logical ports (other than router ports)
+ that are down.
+
-
diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
index d8e48245237..4f032875802 100644
--- a/ovn/northd/ovn-northd.c
+++ b/ovn/northd/ovn-northd.c
@@ -950,6 +950,12 @@ lport_is_enabled(const struct nbrec_logical_port *lport)
return !lport->enabled || *lport->enabled;
}
+static bool
+lport_is_up(const struct nbrec_logical_port *lport)
+{
+ return !lport->up || *lport->up;
+}
+
static bool
has_stateful_acl(struct ovn_datapath *od)
{
@@ -1178,6 +1184,15 @@ build_lswitch_flows(struct hmap *datapaths, struct hmap *ports,
continue;
}
+ /*
+ * Add ARP reply flows if either the
+ * - port is up or
+ * - port type is router
+ */
+ if (!lport_is_up(op->nbs) && strcmp(op->nbs->type, "router")) {
+ continue;
+ }
+
for (size_t i = 0; i < op->nbs->n_addresses; i++) {
struct eth_addr ea;
ovs_be32 ip;