aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_gre.py19
-rw-r--r--test/vpp_gre_interface.py4
2 files changed, 21 insertions, 2 deletions
diff --git a/test/test_gre.py b/test/test_gre.py
index 5cdc0637a1a..7032940cfdb 100644
--- a/test/test_gre.py
+++ b/test/test_gre.py
@@ -674,6 +674,25 @@ class TestGRE(VppTestCase):
self.verify_decapped_4o4(self.pg0, rx, tx)
#
+ # Send tunneled packets that match the created tunnel and
+ # but arrive on an interface that is not in the tunnel's
+ # encap VRF, these are dropped
+ #
+ self.vapi.cli("clear trace")
+ tx = self.create_tunnel_stream_4o4(self.pg2,
+ "2.2.2.2",
+ self.pg1.local_ip4,
+ self.pg0.local_ip4,
+ self.pg0.remote_ip4)
+ self.pg1.add_stream(tx)
+
+ self.pg_enable_capture(self.pg_interfaces)
+ self.pg_start()
+
+ self.pg0.assert_nothing_captured(
+ remark="GRE decap packets in wrong VRF")
+
+ #
# test case cleanup
#
route_tun_dst.remove_vpp_config()
diff --git a/test/vpp_gre_interface.py b/test/vpp_gre_interface.py
index 1c71875f73a..acfd348d64f 100644
--- a/test/vpp_gre_interface.py
+++ b/test/vpp_gre_interface.py
@@ -9,7 +9,7 @@ class VppGreInterface(VppInterface):
"""
def __init__(self, test, src_ip, dst_ip, outer_fib_id=0, is_teb=0):
- """ Create VPP loopback interface """
+ """ Create VPP GRE interface """
self._sw_if_index = 0
super(VppGreInterface, self).__init__(test)
self._test = test
@@ -42,7 +42,7 @@ class VppGre6Interface(VppInterface):
"""
def __init__(self, test, src_ip, dst_ip, outer_fib_id=0, is_teb=0):
- """ Create VPP loopback interface """
+ """ Create VPP GRE interface """
self._sw_if_index = 0
super(VppGre6Interface, self).__init__(test)
self._test = test