summaryrefslogtreecommitdiffstats
path: root/test/vpp_interface.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/vpp_interface.py
parenta18c7c0d5c117aab65b2be1facd646ec393a1a80 (diff)
BFD: IPv6 support
Change-Id: Iaa9538c7cca500c04cf2704e5bf87480543cfcdf Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'test/vpp_interface.py')
-rw-r--r--test/vpp_interface.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/vpp_interface.py b/test/vpp_interface.py
index e0a29f942c7..ee4a9ef6c98 100644
--- a/test/vpp_interface.py
+++ b/test/vpp_interface.py
@@ -131,7 +131,7 @@ class VppInterface(object):
2, count + 2): # 0: network address, 1: local vpp address
mac = "02:%02x:00:00:ff:%02x" % (self.sw_if_index, i)
ip4 = "172.16.%u.%u" % (self.sw_if_index, i)
- ip6 = "fd01:%04x::%04x" % (self.sw_if_index, i)
+ ip6 = "fd01:%x::%x" % (self.sw_if_index, i)
host = Host(mac, ip4, ip6)
self._remote_hosts.append(host)
self._hosts_by_mac[mac] = host
@@ -155,7 +155,7 @@ class VppInterface(object):
self.has_ip4_config = False
self.ip4_table_id = 0
- self._local_ip6 = "fd01:%04x::1" % self.sw_if_index
+ self._local_ip6 = "fd01:%x::1" % self.sw_if_index
self._local_ip6n = socket.inet_pton(socket.AF_INET6, self.local_ip6)
self.local_ip6_prefix_len = 64
self.has_ip6_config = False
@@ -226,6 +226,13 @@ class VppInterface(object):
self.has_ip6_config = False
self.has_ip6_config = False
+ def configure_ipv6_neighbors(self):
+ """For every remote host assign neighbor's MAC to IPv6 address."""
+ for host in self._remote_hosts:
+ macn = host.mac.replace(":", "").decode('hex')
+ self.test.vapi.ip_neighbor_add_del(
+ self.sw_if_index, macn, host.ip6n, is_ipv6=1)
+
def unconfig(self):
"""Unconfigure IPv6 and IPv4 address on the VPP interface."""
self.unconfig_ip4()