summaryrefslogtreecommitdiffhomepage
path: root/ryu/tests/unit/ofproto/test_parser_v12.py
diff options
context:
space:
mode:
Diffstat (limited to 'ryu/tests/unit/ofproto/test_parser_v12.py')
-rw-r--r--ryu/tests/unit/ofproto/test_parser_v12.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/ryu/tests/unit/ofproto/test_parser_v12.py b/ryu/tests/unit/ofproto/test_parser_v12.py
index be10443a..e3f3fb42 100644
--- a/ryu/tests/unit/ofproto/test_parser_v12.py
+++ b/ryu/tests/unit/ofproto/test_parser_v12.py
@@ -3403,6 +3403,18 @@ class TestOFPMatch(unittest.TestCase):
eq_(res.fields[0].header, header)
eq_(res.fields[0].value, value)
+ def test_parse_unknown_field(self):
+ buf = bytearray()
+ ofproto_parser.msg_pack_into('!HH', buf, 0, ofproto_v1_2.OFPMT_OXM,
+ 4 + 6)
+ header = ofproto_v1_2.oxm_tlv_header(36, 2)
+ ofproto_parser.msg_pack_into('!IH', buf, 4, header, 1)
+ header = ofproto_v1_2.OXM_OF_ETH_TYPE
+ ofproto_v1_2_parser.msg_pack_into('!IH', buf, 10, header, 1)
+
+ match = OFPMatch()
+ res = match.parser(str(buf), 0)
+
def test_set_in_port(self):
header = ofproto_v1_2.OXM_OF_IN_PORT
value = in_port = 0xfff8