]> git.proxmox.com Git - mirror_ovs.git/commitdiff
ovn-controller: if 'ovn-bridge-mappings' unconfigured, return directly.
authornickcooper-zhangtonghao <nickcooper-zhangtonghao@opencloud.tech>
Mon, 1 Aug 2016 09:55:26 +0000 (02:55 -0700)
committerRussell Bryant <russell@ovn.org>
Tue, 2 Aug 2016 15:25:39 +0000 (11:25 -0400)
If the chassis doesn't configure the 'external-ids:ovn-bridge-mappings' in
the OVSDB, the 'add_bridge_mappings' should return directly to skip some
unnecessary code.

Signed-off-by: nickcooper-zhangtonghao <nickcooper-zhangtonghao@opencloud.tech>
Signed-off-by: Russell Bryant <russell@ovn.org>
ovn/controller/patch.c

index 012e6ba6b8c2381f27881e2fa2b8cd8c89309144..62d68d91a188b9fa9fb3a10ceaf361178d61c184 100644 (file)
@@ -151,8 +151,8 @@ add_bridge_mappings(struct controller_ctx *ctx,
     cfg = ovsrec_open_vswitch_first(ctx->ovs_idl);
     if (cfg) {
         mappings_cfg = smap_get(&cfg->external_ids, "ovn-bridge-mappings");
-        if (!mappings_cfg) {
-            mappings_cfg = "";
+        if (!mappings_cfg || !mappings_cfg[0]) {
+            return;
         }
     }