]> git.proxmox.com Git - ovs.git/commitdiff
controller: Fix crash on binding with no chassis.
authorRussell Bryant <rbryant@redhat.com>
Wed, 27 May 2015 19:59:26 +0000 (15:59 -0400)
committerBen Pfaff <blp@nicira.com>
Wed, 27 May 2015 20:00:37 +0000 (13:00 -0700)
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@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ovn/controller/physical.c

index dc2fcee5b15592cef3011ac6c385f6eca3b6daf8..dce0c2fe931a845e6dc607fd6c37b7d6d4ab061d 100644 (file)
@@ -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) {