Skip to content

Commit 1cc1778

Browse files
committed
Add boundary tests
1 parent a5e525d commit 1cc1778

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/test.c

+5
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,10 @@ static const struct test tests[] =
579579
"(not packet[46] < 0x6C and packet[56] <= 0x01))))? packet[31] <= 0x00: "
580580
"(not packet[50] >= 0x6F and not packet[9] <= 0x11))",
581581
&pkt_dns_request, TRUE},
582+
{"packet32[13] <= 0xFFFFFFE", &pkt_dns_request, TRUE},
583+
{"packet32[53b] <= 0xFFFFFFE", &pkt_dns_request, TRUE},
584+
{"packet32[14] <= 0xFFFFFFE", &pkt_dns_request, FALSE},
585+
{"packet32[54b] <= 0xFFFFFFE", &pkt_dns_request, FALSE},
582586
{"ip.HdrLength == 5 and ip.TOS == 0 and ip.Length == 57 and "
583587
"ip.Id == 0x2090 and ip.FragOff == 0 and ip.MF == 0 and ip.DF == 0 and "
584588
"ip.TTL == 73 and ip.Protocol == 17 and ip.SrcAddr == 0x0A000001 and "
@@ -677,6 +681,7 @@ static const struct test tests[] =
677681
"packet[72] != 0x00)? (packet[25] > 0x00 or not packet[13] < 0x01): "
678682
"(packet[47] <= 0xAA and not packet[15] != 0x00)))))",
679683
&pkt_ipv6_tcp_syn, FALSE},
684+
{"packet32[-4b] < 0xFFFFFFFE", &pkt_ipv6_tcp_syn, TRUE},
680685
{"ipv6.TrafficClass == 0x00000000 and ipv6.FlowLabel == 0x0000 and "
681686
"ipv6.Length == 40 and ipv6.NextHdr == 6 and ipv6.HopLimit == 64 and "
682687
"ipv6.SrcAddr == 1234:5678:1:0:0:0:aabb:ccdd and "

0 commit comments

Comments
 (0)