L2 BVI/FIB: Update L2 FIB table when BVI's MAC changes

also some moving of l2 headers to reduce dependencies

Change-Id: I7a700a411a91451ef13fd65f9c90de2432b793bb
Signed-off-by: Neale Ranns <nranns@cisco.com>
This commit is contained in:
Neale Ranns
2018-09-06 09:50:26 -07:00
committed by John Lo
parent 3348a4cf07
commit 3b81a1e5f2
27 changed files with 104 additions and 24 deletions

View File

@ -1,7 +1,7 @@
from abc import abstractmethod, ABCMeta
import socket
from util import Host, mk_ll_addr
from util import Host, mk_ll_addr, mactobinary
class VppInterface(object):
@ -170,6 +170,13 @@ class VppInterface(object):
self._hosts_by_ip4 = {}
self._hosts_by_ip6 = {}
def set_mac(self, mac):
self._local_mac = mac
self._local_ip6_ll = mk_ll_addr(mac)
self.test.vapi.sw_interface_set_mac_address(
self.sw_if_index,
mactobinary(self._local_mac))
def set_sw_if_index(self, sw_if_index):
self._sw_if_index = sw_if_index