BFD: IPv6 support

Change-Id: Iaa9538c7cca500c04cf2704e5bf87480543cfcdf
Signed-off-by: Klement Sekera <ksekera@cisco.com>
This commit is contained in:
Klement Sekera
2017-01-02 08:22:23 +01:00
committed by Damjan Marion
parent a18c7c0d5c
commit 46a87adf10
8 changed files with 397 additions and 171 deletions

View File

@ -111,14 +111,24 @@ class VppBFDUDPSession(VppObject):
def local_addr(self):
""" BFD session local address (VPP address) """
if self._local_addr is None:
return self._interface.local_ip4
if self.af == AF_INET:
return self._interface.local_ip4
elif self.af == AF_INET6:
return self._interface.local_ip6
else:
raise Exception("Unexpected af %s' % af" % self.af)
return self._local_addr
@property
def local_addr_n(self):
""" BFD session local address (VPP address) - raw, suitable for API """
if self._local_addr is None:
return self._interface.local_ip4n
if self.af == AF_INET:
return self._interface.local_ip4n
elif self.af == AF_INET6:
return self._interface.local_ip6n
else:
raise Exception("Unexpected af %s' % af" % self.af)
return self._local_addr_n
@property