match-1.3: add IPv6 icmp type/code tests
diff --git a/tests-1.3/match.py b/tests-1.3/match.py
index c74a8de..5f09d16 100644
--- a/tests-1.3/match.py
+++ b/tests-1.3/match.py
@@ -1062,8 +1062,49 @@
self.verify_match(match, matching, nonmatching)
-# TODO ipv6 icmp type
-# TODO ipv6 icmp code
+class IPv6ICMPType(MatchTest):
+ """
+ Match on ipv6 icmp type
+ """
+ def runTest(self):
+ match = ofp.match([
+ ofp.oxm.eth_type(0x86dd),
+ ofp.oxm.ip_proto(58),
+ ofp.oxm.icmpv6_type(3),
+ ])
+
+ matching = {
+ "type=3 code=1": simple_icmpv6_packet(icmp_type=3, icmp_code=1),
+ "type=3 code=2": simple_icmpv6_packet(icmp_type=3, icmp_code=2),
+ }
+
+ nonmatching = {
+ "type=2 code=1": simple_icmpv6_packet(icmp_type=2, icmp_code=1),
+ }
+
+ self.verify_match(match, matching, nonmatching)
+
+class IPv6ICMPCode(MatchTest):
+ """
+ Match on ipv6 icmp code
+ """
+ def runTest(self):
+ match = ofp.match([
+ ofp.oxm.eth_type(0x86dd),
+ ofp.oxm.ip_proto(58),
+ ofp.oxm.icmpv6_code(2),
+ ])
+
+ matching = {
+ "type=3 code=2": simple_icmpv6_packet(icmp_type=3, icmp_code=2),
+ "type=5 code=2": simple_icmpv6_packet(icmp_type=5, icmp_code=2),
+ }
+
+ nonmatching = {
+ "type=3 code=1": simple_icmpv6_packet(icmp_type=2, icmp_code=1),
+ }
+
+ self.verify_match(match, matching, nonmatching)
class ArpOp(MatchTest):
"""