aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_ip6.py
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2019-05-24 13:03:01 -0400
committerDamjan Marion <dmarion@me.com>2019-05-28 13:04:54 +0000
commit9080096f7c548415fc4d5354c7e582a3eda1a5ed (patch)
tree61ebd1313827b5788dd05df425992d750900079f /test/test_ip6.py
parent7704afe2c20a2c2a240874209b5803e22187b620 (diff)
Add an ip6 local hop-by-hop protocol demux table
Add a minimal ip6 hbh header processing test. ioam plugin: use ip6_local_hop_by_hop_register_protocol() in udp_ping_init(). Please test the ioam plugin udp_ping path AYEC, so I can publish the patch. Change-Id: I74e35276d6c38c31022026cfd238fad5e4a54485 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'test/test_ip6.py')
-rw-r--r--test/test_ip6.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/test/test_ip6.py b/test/test_ip6.py
index 7c9df465707..b64dbc1d871 100644
--- a/test/test_ip6.py
+++ b/test/test_ip6.py
@@ -10,7 +10,7 @@ from scapy.contrib.mpls import MPLS
from scapy.layers.inet6 import IPv6, ICMPv6ND_NS, ICMPv6ND_RS, \
ICMPv6ND_RA, ICMPv6NDOptMTU, ICMPv6NDOptSrcLLAddr, ICMPv6NDOptPrefixInfo, \
ICMPv6ND_NA, ICMPv6NDOptDstLLAddr, ICMPv6DestUnreach, icmp6types, \
- ICMPv6TimeExceeded, ICMPv6EchoRequest, ICMPv6EchoReply
+ ICMPv6TimeExceeded, ICMPv6EchoRequest, ICMPv6EchoReply, IPv6ExtHdrHopByHop
from scapy.layers.l2 import Ether, Dot1Q
from scapy.packet import Raw
from scapy.utils import inet_pton, inet_ntop
@@ -2313,6 +2313,19 @@ class TestIP6Input(VppTestCase):
remark=msg or "",
timeout=timeout)
+ def test_hop_by_hop(self):
+ """ Hop-by-hop header test """
+
+ p = (Ether(src=self.pg0.remote_mac,
+ dst=self.pg0.local_mac) /
+ IPv6(src=self.pg0.remote_ip6, dst=self.pg0.local_ip6) /
+ IPv6ExtHdrHopByHop() /
+ inet6.UDP(sport=1234, dport=1234) /
+ Raw('\xa5' * 100))
+
+ self.pg0.add_stream(p)
+ self.pg_enable_capture(self.pg_interfaces)
+ self.pg_start()
if __name__ == '__main__':
unittest.main(testRunner=VppTestRunner)