vlan-splinter: Fix inverted logic bug.
authorAlex Wang <alexw@nicira.com>
Tue, 23 Jul 2013 01:15:49 +0000 (18:15 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 23 Jul 2013 18:23:29 +0000 (11:23 -0700)
When "other-config:enable-vlan-splinters=true" is set, the existing
vlans with ip address must be retained. The bug actually does the
opposite and retains the vlans without ip address. This commit fixes
it.

Reported-by: Roman Sokolkov <rsokolkov@gmail.com>
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
AUTHORS
vswitchd/bridge.c

diff --git a/AUTHORS b/AUTHORS
index c2ef06c..bca47d5 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -197,6 +197,7 @@ Ramana Reddy            gtvrreddy@gmail.com
 Rob Sherwood            rob.sherwood@bigswitch.com
 Roger Leigh             rleigh@codelibre.net
 RogĂ©rio Vinhal Nunes
+Roman Sokolkov          rsokolkov@gmail.com
 Saul St. John           sstjohn@cs.wisc.edu
 Scott Hendricks         shendricks@nicira.com
 Sean Brady              sbrady@gtfservices.com
index a73379c..1460ea2 100644 (file)
@@ -4090,10 +4090,10 @@ collect_splinter_vlans(const struct ovsrec_open_vswitch *ovs_cfg)
                 if (!netdev_open(vlan_dev->name, "system", &netdev)) {
                     if (!netdev_get_in4(netdev, NULL, NULL) ||
                         !netdev_get_in6(netdev, NULL)) {
-                        vlandev_del(vlan_dev->name);
-                    } else {
                         /* It has an IP address configured, so we don't own
                          * it.  Don't delete it. */
+                    } else {
+                        vlandev_del(vlan_dev->name);
                     }
                     netdev_close(netdev);
                 }