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>
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
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()