bbaaef
From 84704b5236952e3a7c191b4b23f5af574f5840d9 Mon Sep 17 00:00:00 2001
bbaaef
From: Russell Bryant <russell@ovn.org>
bbaaef
Date: Mon, 18 Nov 2019 20:27:12 -0500
bbaaef
Subject: [PATCH 1/2] northd: Match IPv4 or IPv6 for MAC resolution
bbaaef
bbaaef
While debugging some problems in a cluster using ovn-kubernetes, I
bbaaef
noticed that we're creating two conflicting logical flows.  These two
bbaaef
flows only matched on the destination MAC address.  It was not
bbaaef
deterministic whether you'd hit the IPv4 (ARP) or IPv6 (NS) version.
bbaaef
bbaaef
This change adds an ip4 or ip6 match to each flow as appropriate.
bbaaef
bbaaef
Signed-off-by: Russell Bryant <russell@ovn.org>
bbaaef
---
bbaaef
 ovn/northd/ovn-northd.c | 4 ++--
bbaaef
 1 file changed, 2 insertions(+), 2 deletions(-)
bbaaef
bbaaef
diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
bbaaef
index cb12be3ca..bcadcca3d 100644
bbaaef
--- a/ovn/northd/ovn-northd.c
bbaaef
+++ b/ovn/northd/ovn-northd.c
bbaaef
@@ -8661,7 +8661,7 @@ build_lrouter_flows(struct hmap *datapaths, struct hmap *ports,
bbaaef
         }
bbaaef
 
bbaaef
         ovn_lflow_add(lflows, od, S_ROUTER_IN_ARP_REQUEST, 100,
bbaaef
-                      "eth.dst == 00:00:00:00:00:00",
bbaaef
+                      "eth.dst == 00:00:00:00:00:00 && ip4",
bbaaef
                       "arp { "
bbaaef
                       "eth.dst = ff:ff:ff:ff:ff:ff; "
bbaaef
                       "arp.spa = reg1; "
bbaaef
@@ -8670,7 +8670,7 @@ build_lrouter_flows(struct hmap *datapaths, struct hmap *ports,
bbaaef
                       "output; "
bbaaef
                       "};");
bbaaef
         ovn_lflow_add(lflows, od, S_ROUTER_IN_ARP_REQUEST, 100,
bbaaef
-                      "eth.dst == 00:00:00:00:00:00",
bbaaef
+                      "eth.dst == 00:00:00:00:00:00 && ip6",
bbaaef
                       "nd_ns { "
bbaaef
                       "nd.target = xxreg0; "
bbaaef
                       "output; "
bbaaef
-- 
bbaaef
2.23.0
bbaaef