[ovs-dev] [PATCH ovn] controller: Fix crash on binding with no chassis.

Russell Bryant rbryant at redhat.com
Wed May 27 19:59:26 UTC 2015


The current code crashes when it encounters a binding that does not
yet have a chassis set.  This patch restores the intended behavior of
ignoring it in that case.

Signed-off-by: Russell Bryant <rbryant at redhat.com>
---
 ovn/controller/physical.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ovn/controller/physical.c b/ovn/controller/physical.c
index dc2fcee..dce0c2f 100644
--- a/ovn/controller/physical.c
+++ b/ovn/controller/physical.c
@@ -115,6 +115,9 @@ physical_run(struct controller_ctx *ctx)
 
         bool local = ofport != 0;
         if (!local) {
+            if (!binding->chassis) {
+                continue;
+            }
             ofport = u16_to_ofp(simap_get(&chassis_to_ofport,
                                           binding->chassis->name));
             if (!ofport) {
-- 
2.4.1




More information about the dev mailing list