ovs-vtep: Clean up local mac entries on startup.
authorAnupam Chanda <achanda@vmware.com>
Mon, 21 Dec 2015 20:20:06 +0000 (12:20 -0800)
committerGurucharan Shetty <guru@ovn.org>
Mon, 21 Dec 2015 21:57:01 +0000 (13:57 -0800)
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@vmware.com>
Signed-off-by: Anupam Chanda <achanda@vmware.com>
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
AUTHORS
vtep/ovs-vtep

diff --git a/AUTHORS b/AUTHORS
index c5c9d51..5a3e826 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -295,6 +295,7 @@ Hemanth Kumar Mantri    mantri@nutanix.com
 Henrik Amren            henrik@nicira.com
 Hiroshi Tanaka          htanaka@nicira.com
 Hiroshi Miyata          miyahiro.dazu@gmail.com
+Hsin-Yi Shen            shenh@vmware.com
 Hyojoon Kim             joonk@gatech.edu
 Ian Stokes              ian.stokes@intel.com
 Igor Ganichev           iganichev@nicira.com
index 46a5692..3244520 100755 (executable)
@@ -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()