vswitchd: Respect other_config:stp-enable port setting.
authorEthan Jackson <ethan@nicira.com>
Wed, 29 Aug 2012 23:00:31 +0000 (16:00 -0700)
committerEthan Jackson <ethan@nicira.com>
Wed, 29 Aug 2012 23:23:07 +0000 (16:23 -0700)
Commit a699f614 (lib: Utilize smaps in the idl.) broke the
other_config:stp-enable port setting in two ways.  First, it
changed the default if the setting was missing to disabled.
Second, if the setting was present, it did the opposite of what the
user configured.

Bug #13122.
Reported-by: Paul Ingram <paul@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
vswitchd/bridge.c

index 0225739..53bb7b9 100644 (file)
@@ -885,7 +885,7 @@ port_configure_stp(const struct ofproto *ofproto, struct port *port,
     const char *config_str;
     struct iface *iface;
 
-    if (smap_get_bool(&port->cfg->other_config, "stp-enable", false)) {
+    if (!smap_get_bool(&port->cfg->other_config, "stp-enable", true)) {
         port_s->enable = false;
         return;
     } else {