From a152a434074ee38e38be6593502ff0058e67c2f4 Mon Sep 17 00:00:00 2001
From: Dumitru Ceara <dceara@redhat.com>
Date: Thu, 14 Nov 2019 13:43:49 +0100
Subject: [PATCH ovn 3/3] ovn-northd: Avoid empty address list when limiting
ARP/ND broadcast.
Reported-by: Numan Siddique <numans@ovn.org>
Fixes: 32f5ebb06226 ("ovn-northd: Limit ARP/ND broadcast domain whenever possible.")
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
Signed-off-by: Numan Siddique <numans@ovn.org>
(cherry-picked from upstream commit 998617cd85bfa1f03f2e734e479fd87f3e833797)
---
ovn/northd/ovn-northd.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
index 03eb7a4..0e6f8f6 100644
--- a/ovn/northd/ovn-northd.c
+++ b/ovn/northd/ovn-northd.c
@@ -5331,10 +5331,14 @@ build_lswitch_rport_arp_req_flows(struct ovn_port *op,
}
}
- build_lswitch_rport_arp_req_flow_for_ip(&all_ips_v4, AF_INET, sw_op,
- sw_od, 75, lflows);
- build_lswitch_rport_arp_req_flow_for_ip(&all_ips_v6, AF_INET6, sw_op,
- sw_od, 75, lflows);
+ if (!sset_is_empty(&all_ips_v4)) {
+ build_lswitch_rport_arp_req_flow_for_ip(&all_ips_v4, AF_INET, sw_op,
+ sw_od, 75, lflows);
+ }
+ if (!sset_is_empty(&all_ips_v6)) {
+ build_lswitch_rport_arp_req_flow_for_ip(&all_ips_v6, AF_INET6, sw_op,
+ sw_od, 75, lflows);
+ }
sset_destroy(&all_ips_v4);
sset_destroy(&all_ips_v6);
--
1.8.3.1