From b41c3e5c904d03ebf1db3f85744c3a9af849de6b Mon Sep 17 00:00:00 2001 From: Alex Wang Date: Mon, 22 Jul 2013 18:15:49 -0700 Subject: [PATCH] vlan-splinter: Fix inverted logic bug. 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 Signed-off-by: Alex Wang Signed-off-by: Ben Pfaff --- AUTHORS | 1 + vswitchd/bridge.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index c2ef06cb7..bca47d5e8 100644 --- 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 diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index a73379ca5..1460ea2d6 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -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); } -- 2.43.0