[ovs-dev] [PATCH] ovs-vtep: Clean up local mac entries on startup.
Anupam Chanda
achanda at vmware.com
Mon Dec 21 20:20:06 UTC 2015
This change handles a corner case where local mac entries are not cleared if a
vlan binding is deleted while the emulator is not running. The fix is to clean
up the local mac entries once on restart.
Reported-by: Hsin-Yi Shen <shenh at vmware.com>
Signed-off-by: Anupam Chanda <achanda at vmware.com>
---
AUTHORS | 1 +
vtep/ovs-vtep | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/AUTHORS b/AUTHORS
index c5c9d51..5a3e826 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -295,6 +295,7 @@ Hemanth Kumar Mantri mantri at nutanix.com
Henrik Amren henrik at nicira.com
Hiroshi Tanaka htanaka at nicira.com
Hiroshi Miyata miyahiro.dazu at gmail.com
+Hsin-Yi Shen shenh at vmware.com
Hyojoon Kim joonk at gatech.edu
Ian Stokes ian.stokes at intel.com
Igor Ganichev iganichev at nicira.com
diff --git a/vtep/ovs-vtep b/vtep/ovs-vtep
index 46a5692..3244520 100755
--- a/vtep/ovs-vtep
+++ b/vtep/ovs-vtep
@@ -651,6 +651,13 @@ def setup():
else:
ovs_vsctl("add-br %s" % bfd_bridge)
+ # Remove local-mac entries from the previous run. Otherwise, if a vlan
+ # binding is removed while the emulator is *not* running, the corresponding
+ # local-mac entries are never cleaned up.
+ vtep_ls = set(vtep_ctl("list-ls").split())
+ for ls_name in vtep_ls:
+ vtep_ctl("clear-local-macs %s" % ls_name)
+
def main():
parser = argparse.ArgumentParser()
--
1.7.9.5
More information about the dev
mailing list