aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2018-05-23 11:21:42 +0200
committerFlorin Coras <florin.coras@gmail.com>2018-05-23 16:40:39 +0000
commitda6e11b47d47c764b11304524de559dda0d0d223 (patch)
treee219f5491c6253bcdae04969d6a2321183f00bef /test
parent8a9c8f1412cb1258340b18a8eb622a835ef3c37b (diff)
VPP-1283: IPv6 PMTU missing MTU value in ICMP6 message.
Fix GRE/IPv6 setting of ip->payload_length (which has never worked). Change-Id: Ie68f1cc7bbb70489d6ec97356132c783f2345e1e Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'test')
-rw-r--r--test/test_mtu.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/test/test_mtu.py b/test/test_mtu.py
index abf0c94b268..cef0ec0d8d5 100644
--- a/test/test_mtu.py
+++ b/test/test_mtu.py
@@ -165,16 +165,22 @@ class TestMTU(VppTestCase):
self.validate(reass_pkt, p4_reply)
'''
# Reset MTU
- self.vapi.sw_interface_set_mtu(self.pg1.sw_if_index, current_mtu)
+ self.vapi.sw_interface_set_mtu(self.pg1.sw_if_index,
+ current_mtu + mtu_offset)
- @unittest.skip("Enable when IPv6 fragmentation is added")
def test_ip6_mtu(self):
""" IP6 MTU test """
+ #
+ # TODO: Link MTU is 216 bytes 'off'. Fix when L3 MTU patches committed
+ #
+ mtu_offset = 216
+ current_mtu = self.get_mtu(self.pg1.sw_if_index)
+ current_mtu -= mtu_offset
+
p_ether = Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac)
p_ip6 = IPv6(src=self.pg0.remote_ip6, dst=self.pg1.remote_ip6)
- current_mtu = self.get_mtu(self.pg1.sw_if_index)
p_payload = UDP(sport=1234, dport=1234) / self.payload(
current_mtu - 40 - 8)
@@ -186,8 +192,8 @@ class TestMTU(VppTestCase):
self.validate(p[1], p6_reply)
# MTU (only checked on encap)
- self.vapi.sw_interface_set_mtu(self.pg1.sw_if_index, 1280)
- self.assertEqual(1280, self.get_mtu(self.pg1.sw_if_index))
+ self.vapi.sw_interface_set_mtu(self.pg1.sw_if_index, 1280 + mtu_offset)
+ self.assertEqual(1280, self.get_mtu(self.pg1.sw_if_index) - mtu_offset)
# Should fail. Too large MTU
p_icmp6 = ICMPv6PacketTooBig(mtu=1280, cksum=0x4c7a)