[ovs-dev] [PATCH] ovn-northd: Warn when the peer of a router port is a switch port.

Gurucharan Shetty guru at ovn.org
Mon Jul 18 08:39:56 UTC 2016


Signed-off-by: Gurucharan Shetty <guru at ovn.org>
---
 ovn/northd/ovn-northd.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
index 7ce509d..0a093c7 100644
--- a/ovn/northd/ovn-northd.c
+++ b/ovn/northd/ovn-northd.c
@@ -2603,6 +2603,14 @@ build_lrouter_flows(struct hmap *datapaths, struct hmap *ports,
                     continue;
                 }
 
+                if (peer->nbs) {
+                    static struct vlog_rate_limit rl =
+                            VLOG_RATE_LIMIT_INIT(5, 1);
+                    VLOG_WARN_RL(&rl, "Bad configuration: The peer of router "
+                                 "port %s is a switch port", op->key);
+                    continue;
+                }
+
                 ds_clear(&match);
                 ds_put_format(&match, "outport == %s && reg0 == ",
                               peer->json_key);
-- 
1.9.1




More information about the dev mailing list