summaryrefslogtreecommitdiffstats
path: root/test/vpp_ip_route.py
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-09-07 01:48:54 -0700
committerDamjan Marion <dmarion@me.com>2018-09-07 11:16:14 +0000
commit3b93be5d76cbcb5dc3d3aee5c72a797014a346f9 (patch)
tree6c8706c9b518ee09ccdee790296e1759c5f78c76 /test/vpp_ip_route.py
parentc84cbad785fa11c1dba92b8e87ad234d779d1cbd (diff)
IP route update fix when multipath and drop set
Change-Id: I9cec7486cb6e3c5261d74d2b15a4d19469285a30 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'test/vpp_ip_route.py')
-rw-r--r--test/vpp_ip_route.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/vpp_ip_route.py b/test/vpp_ip_route.py
index 9e5c53184e3..216f5c7b2c1 100644
--- a/test/vpp_ip_route.py
+++ b/test/vpp_ip_route.py
@@ -223,7 +223,7 @@ class VppIpRoute(VppObject):
def __init__(self, test, dest_addr,
dest_addr_len, paths, table_id=0, is_ip6=0, is_local=0,
- is_unreach=0, is_prohibit=0):
+ is_unreach=0, is_prohibit=0, is_drop=0):
self._test = test
self.paths = paths
self.dest_addr_len = dest_addr_len
@@ -232,6 +232,7 @@ class VppIpRoute(VppObject):
self.is_local = is_local
self.is_unreach = is_unreach
self.is_prohibit = is_prohibit
+ self.is_drop = is_drop
self.dest_addr_p = dest_addr
if is_ip6:
self.dest_addr = inet_pton(AF_INET6, dest_addr)
@@ -246,7 +247,8 @@ class VppIpRoute(VppObject):
self.is_prohibit = is_prohibit
def add_vpp_config(self):
- if self.is_local or self.is_unreach or self.is_prohibit:
+ if self.is_local or self.is_unreach or \
+ self.is_prohibit or self.is_drop:
self._test.vapi.ip_add_del_route(
self.dest_addr,
self.dest_addr_len,
@@ -255,6 +257,7 @@ class VppIpRoute(VppObject):
is_local=self.is_local,
is_unreach=self.is_unreach,
is_prohibit=self.is_prohibit,
+ is_drop=self.is_drop,
table_id=self.table_id,
is_ipv6=self.is_ip6)
else:
@@ -282,7 +285,8 @@ class VppIpRoute(VppObject):
self._test.registry.register(self, self._test.logger)
def remove_vpp_config(self):
- if self.is_local or self.is_unreach or self.is_prohibit:
+ if self.is_local or self.is_unreach or \
+ self.is_prohibit or self.is_drop:
self._test.vapi.ip_add_del_route(
self.dest_addr,
self.dest_addr_len,