summaryrefslogtreecommitdiffstats
path: root/test/bfd.py
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2017-01-02 08:22:23 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2017-01-17 22:02:02 +0000
commit46a87adf10d41af4b1b14f06bdab33228cbaae95 (patch)
tree9ddb252a4d843eee0caf45fd18cbf68aca764f20 /test/bfd.py
parenta18c7c0d5c117aab65b2be1facd646ec393a1a80 (diff)
BFD: IPv6 support
Change-Id: Iaa9538c7cca500c04cf2704e5bf87480543cfcdf Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'test/bfd.py')
-rw-r--r--test/bfd.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/test/bfd.py b/test/bfd.py
index 57a5bd86751..5171681369c 100644
--- a/test/bfd.py
+++ b/test/bfd.py
@@ -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