diff --git a/docs/CHANGELOG b/docs/CHANGELOG index 11f60552..829a5c81 100644 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -1,8 +1,9 @@ -02/10/2022 Version 4.4.1-beta1 +02/11/2022 Version 4.4.1-beta1 - fix support for piping PCAP files from STDIN (#708) - build failures Debian/kfreebsd (#706) - bus error when building on armhf (#705) - typo fixes (#704) + - heap buffer overflow in tcpreplay (#703) - double free in Juniper DLT (#702) 01/31/2022 Version 4.4.0 diff --git a/src/common/err.h b/src/common/err.h index 2c9e56ca..fde7aa34 100644 --- a/src/common/err.h +++ b/src/common/err.h @@ -103,6 +103,16 @@ void notice(const char *fmt, ...); exit(x); \ } while (0) +#define err_no_exit(y) do { \ + fprintf(stderr, "\nFatal Error in %s:%s() line %d:\n%s\n", __FILE__, __FUNCTION__, __LINE__, y); \ + fflush(NULL); \ + } while (0) + +#define err_no_exitx(y, ...) do {\ + fprintf(stderr, "\nFatal Error in %s:%s() line %d:\n " y "\n", __FILE__, __FUNCTION__, __LINE__, __VA_ARGS__); \ + fflush(NULL); \ + } while (0) + #else /* no detailed DEBUG info */ /* dbg() and dbgx() become no-ops for non-DEBUG builds */ @@ -124,6 +134,16 @@ void notice(const char *fmt, ...); fflush(NULL); \ exit(x); \ } while (0) + +#define err_no_exit(y) do {\ + fprintf(stderr, "\nFatal Error:\n%s\n", y); \ + fflush(NULL); \ + } while(0) + +#define err_no_exitx(y, ...) do {\ + fprintf(stderr, "\nFatal Error: " y "\n", __VA_ARGS__); \ + fflush(NULL); \ + } while (0) #endif /* DEBUG */ diff --git a/src/tcpedit/checksum.c b/src/tcpedit/checksum.c index fcf7e739..cec60504 100644 --- a/src/tcpedit/checksum.c +++ b/src/tcpedit/checksum.c @@ -154,24 +154,15 @@ do_checksum(tcpedit_t *tcpedit, uint8_t *data, int proto, int len) { icmp6->icmp_sum = CHECKSUM_CARRY(sum); break; - case IPPROTO_IP: + default: if (ipv4) { ipv4->ip_sum = 0; sum = do_checksum_math((uint16_t *)data, ip_hl); ipv4->ip_sum = CHECKSUM_CARRY(sum); + } else { + tcpedit_setwarn(tcpedit, "Unsupported protocol for checksum: 0x%x", proto); + return TCPEDIT_WARN; } - break; - - case IPPROTO_IGMP: - case IPPROTO_GRE: - case IPPROTO_OSPF: - case IPPROTO_OSPF_LSA: - case IPPROTO_VRRP: - case TCPR_PROTO_CDP: - case TCPR_PROTO_ISL: - default: - tcpedit_setwarn(tcpedit, "Unsupported protocol for checksum: 0x%x", proto); - return TCPEDIT_WARN; } return TCPEDIT_OK; diff --git a/src/tcpedit/edit_packet.c b/src/tcpedit/edit_packet.c index c1970c9c..401fdd73 100644 --- a/src/tcpedit/edit_packet.c +++ b/src/tcpedit/edit_packet.c @@ -43,8 +43,8 @@ static int is_unicast_ipv4(tcpedit_t *tcpedit, uint32_t ip); static void randomize_ipv6_addr(tcpedit_t *tcpedit, struct tcpr_in6_addr *addr); static int remap_ipv6(tcpedit_t *tcpedit, tcpr_cidr_t *cidr, struct tcpr_in6_addr *addr); static int is_multicast_ipv6(tcpedit_t *tcpedit, struct tcpr_in6_addr *addr); - -static int ipv6_header_length(ipv6_hdr_t const * ip6_hdr, int pkt_len); +static int ipv6_header_length(ipv6_hdr_t const * ip6_hdr, const size_t pkt_len, + const size_t l2len); /** * this code re-calcs the IP and Layer 4 checksums @@ -56,36 +56,44 @@ static int ipv6_header_length(ipv6_hdr_t const * ip6_hdr, int pkt_len); * Returns 0 on success, -1 on error */ int -fix_ipv4_checksums(tcpedit_t *tcpedit, struct pcap_pkthdr *pkthdr, ipv4_hdr_t *ip_hdr) +fix_ipv4_checksums(tcpedit_t *tcpedit, struct pcap_pkthdr *pkthdr, + ipv4_hdr_t *ip_hdr, const size_t l2len) { int ret1 = 0, ret2 = 0, ip_len; assert(tcpedit); assert(pkthdr); assert(ip_hdr); - if (pkthdr->caplen < sizeof(*ip_hdr)) { - tcpedit_setwarn(tcpedit, "caplen too small to read IPv4 header: %u", - pkthdr->caplen); + if (pkthdr->caplen < (sizeof(*ip_hdr) + l2len)) { + tcpedit_setwarn(tcpedit, "caplen too small to read IPv4 header: caplen=%u: pkt=" COUNTER_SPEC, + pkthdr->caplen, tcpedit->runtime.packetnum); return TCPEDIT_WARN; } if (ip_hdr->ip_v != 4) { - tcpedit_seterr(tcpedit, "Invalid packet: Expected IPv4 packet: got %u", ip_hdr->ip_v); + tcpedit_seterr(tcpedit, "Invalid packet: Expected IPv4 packet: got %u: pkt=" COUNTER_SPEC, + ip_hdr->ip_v, tcpedit->runtime.packetnum); return TCPEDIT_ERROR; } + ip_len = (int)ntohs(ip_hdr->ip_len); /* calc the L4 checksum if we have the whole packet && not a frag or first frag */ if (pkthdr->caplen == pkthdr->len && (htons(ip_hdr->ip_off) & (IP_MF | IP_OFFMASK)) == 0) { - ip_len = (int)ntohs(ip_hdr->ip_len); - ret1 = do_checksum(tcpedit, (u_char *) ip_hdr, ip_hdr->ip_p, - ip_len - (ip_hdr->ip_hl << 2)); + if (ip_len != (int)(pkthdr->caplen - l2len)) { + tcpedit_seterr(tcpedit, + "caplen minus L2 length %u does IPv4 header length %u: pkt=" COUNTER_SPEC, + pkthdr->caplen - l2len, ip_len, + tcpedit->runtime.packetnum); + return TCPEDIT_ERROR; + } + ret1 = do_checksum(tcpedit, (u_char*)ip_hdr, ip_hdr->ip_p, + ip_len - (ip_hdr->ip_hl << 2)); if (ret1 < 0) return TCPEDIT_ERROR; } /* calc IP checksum */ - ip_len = (int)ntohs(ip_hdr->ip_len); ret2 = do_checksum(tcpedit, (u_char *) ip_hdr, IPPROTO_IP, ip_len); if (ret2 < 0) return TCPEDIT_ERROR; @@ -102,7 +110,8 @@ fix_ipv4_checksums(tcpedit_t *tcpedit, struct pcap_pkthdr *pkthdr, ipv4_hdr_t *i * -1 on error */ static int -ipv6_header_length(ipv6_hdr_t const * ip6_hdr, int pkt_len) +ipv6_header_length(ipv6_hdr_t const * ip6_hdr, const size_t pkt_len, + const size_t l2len) { struct tcpr_ipv6_ext_hdr_base const * nhdr; uint8_t next_header; @@ -111,8 +120,7 @@ ipv6_header_length(ipv6_hdr_t const * ip6_hdr, int pkt_len) offset = sizeof(*ip6_hdr); next_header = ip6_hdr->ip_nh; - while (sizeof(*nhdr) + offset < (size_t)pkt_len) - { + while (sizeof(*nhdr) + offset + l2len < (size_t)pkt_len) { if (next_header != TCPR_IPV6_NH_HBH && next_header != TCPR_IPV6_NH_ROUTING && next_header != TCPR_IPV6_NH_FRAGMENT) { @@ -128,16 +136,17 @@ ipv6_header_length(ipv6_hdr_t const * ip6_hdr, int pkt_len) } int -fix_ipv6_checksums(tcpedit_t *tcpedit, struct pcap_pkthdr *pkthdr, ipv6_hdr_t *ip6_hdr) +fix_ipv6_checksums(tcpedit_t *tcpedit, struct pcap_pkthdr *pkthdr, + ipv6_hdr_t *ip6_hdr, const size_t l2len) { int ret = 0; assert(tcpedit); assert(pkthdr); assert(ip6_hdr); - if (pkthdr->caplen < sizeof(*ip6_hdr)) { - tcpedit_setwarn(tcpedit, "caplen too small to read IPv6 header: %u", - pkthdr->caplen); + if (pkthdr->caplen < (sizeof(*ip6_hdr) + l2len)) { + tcpedit_setwarn(tcpedit, "caplen too small to read IPv6 header: caplen=%u pkt=" COUNTER_SPEC, + pkthdr->caplen, tcpedit->runtime.packetnum); return TCPEDIT_WARN; } @@ -149,9 +158,10 @@ fix_ipv6_checksums(tcpedit_t *tcpedit, struct pcap_pkthdr *pkthdr, ipv6_hdr_t *i /* calc the L4 checksum if we have the whole packet && not a frag or first frag */ if (pkthdr->caplen == pkthdr->len) { - if (ip6_hdr->ip_len < ipv6_header_length(ip6_hdr, pkthdr->len)) { - tcpedit_setwarn(tcpedit, "Unable to checksum IPv6 packet with invalid length %u", - ip6_hdr->ip_len); + int ip6_len = ipv6_header_length(ip6_hdr, pkthdr->len, l2len); + if (ip6_hdr->ip_len < ip6_len) { + tcpedit_setwarn(tcpedit, "Unable to checksum IPv6 packet with invalid: pkt=" COUNTER_SPEC " IP length=%u caplen=" COUNTER_SPEC, + tcpedit->runtime.packetnum, ip6_hdr->ip_len); return TCPEDIT_WARN; } ret = do_checksum(tcpedit, (u_char *)ip6_hdr, ip6_hdr->ip_nh, @@ -167,20 +177,6 @@ fix_ipv6_checksums(tcpedit_t *tcpedit, struct pcap_pkthdr *pkthdr, ipv6_hdr_t *i return TCPEDIT_OK; } -/* - * #406 fix IP headers which may be not be set properly due to TCP segmentation - */ -void fix_ipv4_length(struct pcap_pkthdr *pkthdr, ipv4_hdr_t *ip_hdr) -{ - if (!ip_hdr->ip_len) - ip_hdr->ip_len = htons((uint16_t)pkthdr->len); -} - -void fix_ipv6_length(struct pcap_pkthdr *pkthdr, ipv6_hdr_t *ip6_hdr) -{ - if (!ip6_hdr->ip_len) - ip6_hdr->ip_len = htons((uint16_t)pkthdr->len); -} static void ipv4_l34_csum_replace(uint8_t *data, uint8_t protocol, uint32_t old, uint32_t new) @@ -369,6 +365,40 @@ randomize_ipv6_addr(tcpedit_t *tcpedit, struct tcpr_in6_addr *addr) } } +int fix_ipv4_length(struct pcap_pkthdr *pkthdr, ipv4_hdr_t *ip_hdr, + const size_t l2len) +{ + int ip_len = (int)ntohs(ip_hdr->ip_len); + int ip_len_want = (int)(pkthdr->len - l2len); + + if (pkthdr->caplen < l2len + sizeof(*ip_hdr)) + return -1; + + if ((htons(ip_hdr->ip_off) & (IP_MF | IP_OFFMASK)) == 0 && + ip_len != ip_len_want) { + ip_hdr->ip_len = htons(ip_len_want); + return 1; + } + + return 0; +} + +int fix_ipv6_length(struct pcap_pkthdr *pkthdr, ipv6_hdr_t *ip6_hdr, + const size_t l2len) +{ + int ip_len = ntohs((uint16_t)ip6_hdr->ip_len); + int ip_len_want = (int)(pkthdr->len - l2len - sizeof(*ip6_hdr)); + + if (pkthdr->caplen < l2len + sizeof(*ip6_hdr)) + return -1; + + if (ip_len != ip_len_want) { + ip6_hdr->ip_len = htons((uint16_t)ip_len_want); + return 1; + } + + return 0; +} /** * randomizes the source and destination IP addresses based on a @@ -446,8 +476,8 @@ randomize_ipv6(tcpedit_t *tcpedit, struct pcap_pkthdr *pkthdr, /* randomize IP addresses based on the value of random */ dbgx(1, "Old Src IP: %s\tOld Dst IP: %s", srcip, dstip); if (l3len < (int)sizeof(ipv6_hdr_t)) { - tcpedit_seterr(tcpedit, "Unable to randomize IPv6 header due to packet capture snap length %u", - pkthdr->caplen); + tcpedit_seterr(tcpedit, "Unable to randomize IPv6 header due to packet capture snap length %u: pkt=" COUNTER_SPEC, + pkthdr->caplen, tcpedit->runtime.packetnum); return TCPEDIT_ERROR; } diff --git a/src/tcpedit/edit_packet.h b/src/tcpedit/edit_packet.h index f841a5ba..c4972fcd 100644 --- a/src/tcpedit/edit_packet.h +++ b/src/tcpedit/edit_packet.h @@ -37,14 +37,16 @@ int randomize_iparp(tcpedit_t *tcpedit, struct pcap_pkthdr *pkthdr, u_char *pktdata, int datalink, const int l3len); int fix_ipv4_checksums(tcpedit_t *tcpedit, struct pcap_pkthdr *pkdhdr, - ipv4_hdr_t *ip_hdr); + ipv4_hdr_t *ip_hdr, const size_t l2len); int fix_ipv6_checksums(tcpedit_t *tcpedit, struct pcap_pkthdr *pkdhdr, - ipv6_hdr_t *ip_hdr); + ipv6_hdr_t *ip_hdr, const size_t l2len); -void fix_ipv4_length(struct pcap_pkthdr *pkthdr, ipv4_hdr_t *ip_hdr); +int fix_ipv4_length(struct pcap_pkthdr *pkthdr, ipv4_hdr_t *ip_hdr, + const size_t l2len); -void fix_ipv6_length(struct pcap_pkthdr *pkthdr, ipv6_hdr_t *ip6_hdr); +int fix_ipv6_length(struct pcap_pkthdr *pkthdr, ipv6_hdr_t *ip6_hdr, + const size_t l2len); int extract_data(tcpedit_t *tcpedit, const u_char *pktdata, int caplen, char *l7data[]); diff --git a/src/tcpedit/tcpedit.c b/src/tcpedit/tcpedit.c index a6be84f9..d5463959 100644 --- a/src/tcpedit/tcpedit.c +++ b/src/tcpedit/tcpedit.c @@ -356,14 +356,22 @@ tcpedit_packet(tcpedit_t *tcpedit, struct pcap_pkthdr **pkthdr, } } + /* ensure IP header length is correct */ + if (ip_hdr != NULL) { + needtorecalc |= fix_ipv4_length(*pkthdr, ip_hdr, l2len); + needtorecalc = 1; + } else if (ip6_hdr != NULL) { + needtorecalc |= fix_ipv6_length(*pkthdr, ip6_hdr, l2len); + } + /* do we need to fix checksums? -- must always do this last! */ - if ((tcpedit->fixcsum || needtorecalc)) { + if ((tcpedit->fixcsum || needtorecalc > 0)) { if (ip_hdr != NULL) { dbgx(3, "doing IPv4 checksum: needtorecalc=%d", needtorecalc); - retval = fix_ipv4_checksums(tcpedit, *pkthdr, ip_hdr); + retval = fix_ipv4_checksums(tcpedit, *pkthdr, ip_hdr, l2len); } else if (ip6_hdr != NULL) { dbgx(3, "doing IPv6 checksum: needtorecalc=%d", needtorecalc); - retval = fix_ipv6_checksums(tcpedit, *pkthdr, ip6_hdr); + retval = fix_ipv6_checksums(tcpedit, *pkthdr, ip6_hdr, l2len); } else { dbgx(3, "checksum not performed: needtorecalc=%d", needtorecalc); retval = TCPEDIT_OK; diff --git a/src/tcprewrite.c b/src/tcprewrite.c index 4e386bc3..8a3f36e7 100644 --- a/src/tcprewrite.c +++ b/src/tcprewrite.c @@ -80,22 +80,26 @@ main(int argc, char *argv[]) /* init tcpedit context */ if (tcpedit_init(&tcpedit, pcap_datalink(options.pin)) < 0) { - errx(-1, "Error initializing tcpedit: %s", tcpedit_geterr(tcpedit)); + err_no_exitx("Error initializing tcpedit: %s", tcpedit_geterr(tcpedit)); + tcpedit_close(&tcpedit); + exit(-1); } /* parse the tcpedit args */ rcode = tcpedit_post_args(tcpedit); if (rcode < 0) { + err_no_exitx("Unable to parse args: %s", tcpedit_geterr(tcpedit)); tcpedit_close(&tcpedit); - errx(-1, "Unable to parse args: %s", tcpedit_geterr(tcpedit)); + exit(-1); } else if (rcode == 1) { warnx("%s", tcpedit_geterr(tcpedit)); } if (tcpedit_validate(tcpedit) < 0) { - tcpedit_close(&tcpedit); - errx(-1, "Unable to edit packets given options:\n%s", + err_no_exitx("Unable to edit packets given options:\n%s", tcpedit_geterr(tcpedit)); + tcpedit_close(&tcpedit); + exit(-1); } /* fuzzing init */ @@ -116,8 +120,9 @@ main(int argc, char *argv[]) #ifdef ENABLE_FRAGROUTE if (options.fragroute_args) { if ((options.frag_ctx = fragroute_init(65535, pcap_datalink(dlt_pcap), options.fragroute_args, ebuf)) == NULL) { + err_no_exitx("%s", ebuf); tcpedit_close(&tcpedit); - errx(-1, "%s", ebuf); + exit(-1); } } #endif @@ -129,16 +134,18 @@ main(int argc, char *argv[]) #endif if ((options.pout = pcap_dump_open(dlt_pcap, options.outfile)) == NULL) { + err_no_exitx("Unable to open output pcap file: %s", pcap_geterr(dlt_pcap)); tcpedit_close(&tcpedit); - errx(-1, "Unable to open output pcap file: %s", pcap_geterr(dlt_pcap)); + exit(-1); } pcap_close(dlt_pcap); /* rewrite packets */ if (rewrite_packets(tcpedit, options.pin, options.pout) == TCPEDIT_ERROR) { + err_no_exitx("Error rewriting packets: %s", tcpedit_geterr(tcpedit)); tcpedit_close(&tcpedit); - errx(-1, "Error rewriting packets: %s", tcpedit_geterr(tcpedit)); + exit(-1); } /* clean up after ourselves */ diff --git a/test/test.rewrite_1ttl b/test/test.rewrite_1ttl index 0867afe6..8ed279a1 100644 Binary files a/test/test.rewrite_1ttl and b/test/test.rewrite_1ttl differ diff --git a/test/test.rewrite_2ttl b/test/test.rewrite_2ttl index b3d0953b..9427e3a0 100644 Binary files a/test/test.rewrite_2ttl and b/test/test.rewrite_2ttl differ diff --git a/test/test.rewrite_3ttl b/test/test.rewrite_3ttl index 23fce16e..7205a082 100644 Binary files a/test/test.rewrite_3ttl and b/test/test.rewrite_3ttl differ diff --git a/test/test.rewrite_config b/test/test.rewrite_config index 447c26ed..89fdedcc 100644 Binary files a/test/test.rewrite_config and b/test/test.rewrite_config differ diff --git a/test/test.rewrite_dlthdlc b/test/test.rewrite_dlthdlc index 61abbd45..3f221510 100644 Binary files a/test/test.rewrite_dlthdlc and b/test/test.rewrite_dlthdlc differ diff --git a/test/test.rewrite_dltuser b/test/test.rewrite_dltuser index 7074f81d..7b4fc8aa 100644 Binary files a/test/test.rewrite_dltuser and b/test/test.rewrite_dltuser differ diff --git a/test/test.rewrite_efcs b/test/test.rewrite_efcs index 1af5780b..da4fa0d3 100644 Binary files a/test/test.rewrite_efcs and b/test/test.rewrite_efcs differ diff --git a/test/test.rewrite_endpoint b/test/test.rewrite_endpoint index a740d140..5fab4470 100644 Binary files a/test/test.rewrite_endpoint and b/test/test.rewrite_endpoint differ diff --git a/test/test.rewrite_enet_subsmac b/test/test.rewrite_enet_subsmac index 4645ba34..cc6af5a5 100644 Binary files a/test/test.rewrite_enet_subsmac and b/test/test.rewrite_enet_subsmac differ diff --git a/test/test.rewrite_fixcsum b/test/test.rewrite_fixcsum index f4faf65c..b116ffba 100644 Binary files a/test/test.rewrite_fixcsum and b/test/test.rewrite_fixcsum differ diff --git a/test/test.rewrite_fixlen_del b/test/test.rewrite_fixlen_del index 8bdfd440..fb3578d7 100644 Binary files a/test/test.rewrite_fixlen_del and b/test/test.rewrite_fixlen_del differ diff --git a/test/test.rewrite_fixlen_pad b/test/test.rewrite_fixlen_pad index 8bdfd440..fb3578d7 100644 Binary files a/test/test.rewrite_fixlen_pad and b/test/test.rewrite_fixlen_pad differ diff --git a/test/test.rewrite_fixlen_trunc b/test/test.rewrite_fixlen_trunc index 8bdfd440..fb3578d7 100644 Binary files a/test/test.rewrite_fixlen_trunc and b/test/test.rewrite_fixlen_trunc differ diff --git a/test/test.rewrite_l7fuzzing b/test/test.rewrite_l7fuzzing index 48497cb5..d4bdc9e8 100644 Binary files a/test/test.rewrite_l7fuzzing and b/test/test.rewrite_l7fuzzing differ diff --git a/test/test.rewrite_layer2 b/test/test.rewrite_layer2 index 8f2efc97..be034dc6 100644 Binary files a/test/test.rewrite_layer2 and b/test/test.rewrite_layer2 differ diff --git a/test/test.rewrite_mac b/test/test.rewrite_mac index 3a47cab5..1a0bee42 100644 Binary files a/test/test.rewrite_mac and b/test/test.rewrite_mac differ diff --git a/test/test.rewrite_mac_seed b/test/test.rewrite_mac_seed index e41be9e7..79b8fc81 100644 Binary files a/test/test.rewrite_mac_seed and b/test/test.rewrite_mac_seed differ diff --git a/test/test.rewrite_mac_seed_keep b/test/test.rewrite_mac_seed_keep index b53e4d31..2d0d903c 100644 Binary files a/test/test.rewrite_mac_seed_keep and b/test/test.rewrite_mac_seed_keep differ diff --git a/test/test.rewrite_mtutrunc b/test/test.rewrite_mtutrunc index aa698704..5a873dd9 100644 Binary files a/test/test.rewrite_mtutrunc and b/test/test.rewrite_mtutrunc differ diff --git a/test/test.rewrite_pad b/test/test.rewrite_pad index 8bdfd440..fb3578d7 100644 Binary files a/test/test.rewrite_pad and b/test/test.rewrite_pad differ diff --git a/test/test.rewrite_pnat b/test/test.rewrite_pnat index 092abed0..277d3d4b 100644 Binary files a/test/test.rewrite_pnat and b/test/test.rewrite_pnat differ diff --git a/test/test.rewrite_portmap b/test/test.rewrite_portmap index a392ec53..47203611 100644 Binary files a/test/test.rewrite_portmap and b/test/test.rewrite_portmap differ diff --git a/test/test.rewrite_range_portmap b/test/test.rewrite_range_portmap index a203b8c4..8dd0189b 100644 Binary files a/test/test.rewrite_range_portmap and b/test/test.rewrite_range_portmap differ diff --git a/test/test.rewrite_seed b/test/test.rewrite_seed index 1110cafe..b2e47392 100644 Binary files a/test/test.rewrite_seed and b/test/test.rewrite_seed differ diff --git a/test/test.rewrite_sequence b/test/test.rewrite_sequence index 3389b68c..70b36575 100644 Binary files a/test/test.rewrite_sequence and b/test/test.rewrite_sequence differ diff --git a/test/test.rewrite_skip b/test/test.rewrite_skip index 436e8d13..378e930b 100644 Binary files a/test/test.rewrite_skip and b/test/test.rewrite_skip differ diff --git a/test/test.rewrite_tos b/test/test.rewrite_tos index afb19d52..2c8ce6f3 100644 Binary files a/test/test.rewrite_tos and b/test/test.rewrite_tos differ diff --git a/test/test.rewrite_trunc b/test/test.rewrite_trunc index 8bdfd440..fb3578d7 100644 Binary files a/test/test.rewrite_trunc and b/test/test.rewrite_trunc differ diff --git a/test/test.rewrite_vlan802.1ad b/test/test.rewrite_vlan802.1ad index a9aff56d..6948826c 100644 Binary files a/test/test.rewrite_vlan802.1ad and b/test/test.rewrite_vlan802.1ad differ diff --git a/test/test.rewrite_vlandel b/test/test.rewrite_vlandel index 8bdfd440..fb3578d7 100644 Binary files a/test/test.rewrite_vlandel and b/test/test.rewrite_vlandel differ diff --git a/test/test2.rewrite_1ttl b/test/test2.rewrite_1ttl index 49a23f49..be3383b1 100644 Binary files a/test/test2.rewrite_1ttl and b/test/test2.rewrite_1ttl differ diff --git a/test/test2.rewrite_2ttl b/test/test2.rewrite_2ttl index 5b13ea49..1cfe16b0 100644 Binary files a/test/test2.rewrite_2ttl and b/test/test2.rewrite_2ttl differ diff --git a/test/test2.rewrite_3ttl b/test/test2.rewrite_3ttl index e7361db3..42e2b556 100644 Binary files a/test/test2.rewrite_3ttl and b/test/test2.rewrite_3ttl differ diff --git a/test/test2.rewrite_config b/test/test2.rewrite_config index 3404ef96..4bfab287 100644 Binary files a/test/test2.rewrite_config and b/test/test2.rewrite_config differ diff --git a/test/test2.rewrite_dlthdlc b/test/test2.rewrite_dlthdlc index 01c351cb..0c047247 100644 Binary files a/test/test2.rewrite_dlthdlc and b/test/test2.rewrite_dlthdlc differ diff --git a/test/test2.rewrite_dltuser b/test/test2.rewrite_dltuser index ce15642f..0b605a59 100644 Binary files a/test/test2.rewrite_dltuser and b/test/test2.rewrite_dltuser differ diff --git a/test/test2.rewrite_efcs b/test/test2.rewrite_efcs index f5e93940..d9e23a20 100644 Binary files a/test/test2.rewrite_efcs and b/test/test2.rewrite_efcs differ diff --git a/test/test2.rewrite_endpoint b/test/test2.rewrite_endpoint index a1481832..c927c453 100644 Binary files a/test/test2.rewrite_endpoint and b/test/test2.rewrite_endpoint differ diff --git a/test/test2.rewrite_enet_subsmac b/test/test2.rewrite_enet_subsmac index 9fb48790..e53bfb44 100644 Binary files a/test/test2.rewrite_enet_subsmac and b/test/test2.rewrite_enet_subsmac differ diff --git a/test/test2.rewrite_fixcsum b/test/test2.rewrite_fixcsum index 662f4e1e..e0089287 100644 Binary files a/test/test2.rewrite_fixcsum and b/test/test2.rewrite_fixcsum differ diff --git a/test/test2.rewrite_fixlen_del b/test/test2.rewrite_fixlen_del index 13f39320..c0f39d75 100644 Binary files a/test/test2.rewrite_fixlen_del and b/test/test2.rewrite_fixlen_del differ diff --git a/test/test2.rewrite_fixlen_pad b/test/test2.rewrite_fixlen_pad index 13f39320..c0f39d75 100644 Binary files a/test/test2.rewrite_fixlen_pad and b/test/test2.rewrite_fixlen_pad differ diff --git a/test/test2.rewrite_fixlen_trunc b/test/test2.rewrite_fixlen_trunc index 13f39320..c0f39d75 100644 Binary files a/test/test2.rewrite_fixlen_trunc and b/test/test2.rewrite_fixlen_trunc differ diff --git a/test/test2.rewrite_l7fuzzing b/test/test2.rewrite_l7fuzzing index a07b67ce..aa6fc64b 100644 Binary files a/test/test2.rewrite_l7fuzzing and b/test/test2.rewrite_l7fuzzing differ diff --git a/test/test2.rewrite_layer2 b/test/test2.rewrite_layer2 index 885d6b73..c961f9e1 100644 Binary files a/test/test2.rewrite_layer2 and b/test/test2.rewrite_layer2 differ diff --git a/test/test2.rewrite_mac b/test/test2.rewrite_mac index 55ef3449..cdf805b9 100644 Binary files a/test/test2.rewrite_mac and b/test/test2.rewrite_mac differ diff --git a/test/test2.rewrite_mac_seed b/test/test2.rewrite_mac_seed index b3a7e293..dffc054a 100644 Binary files a/test/test2.rewrite_mac_seed and b/test/test2.rewrite_mac_seed differ diff --git a/test/test2.rewrite_mac_seed_keep b/test/test2.rewrite_mac_seed_keep index 75c56de6..11642896 100644 Binary files a/test/test2.rewrite_mac_seed_keep and b/test/test2.rewrite_mac_seed_keep differ diff --git a/test/test2.rewrite_mtutrunc b/test/test2.rewrite_mtutrunc index bedffdbc..ede5109d 100644 Binary files a/test/test2.rewrite_mtutrunc and b/test/test2.rewrite_mtutrunc differ diff --git a/test/test2.rewrite_pad b/test/test2.rewrite_pad index 13f39320..c0f39d75 100644 Binary files a/test/test2.rewrite_pad and b/test/test2.rewrite_pad differ diff --git a/test/test2.rewrite_pnat b/test/test2.rewrite_pnat index 8312a7c3..8e3cba77 100644 Binary files a/test/test2.rewrite_pnat and b/test/test2.rewrite_pnat differ diff --git a/test/test2.rewrite_portmap b/test/test2.rewrite_portmap index ec61e677..90f90597 100644 Binary files a/test/test2.rewrite_portmap and b/test/test2.rewrite_portmap differ diff --git a/test/test2.rewrite_range_portmap b/test/test2.rewrite_range_portmap index 2c764bd3..71787ce3 100644 Binary files a/test/test2.rewrite_range_portmap and b/test/test2.rewrite_range_portmap differ diff --git a/test/test2.rewrite_seed b/test/test2.rewrite_seed index e50301bb..2b0a5369 100644 Binary files a/test/test2.rewrite_seed and b/test/test2.rewrite_seed differ diff --git a/test/test2.rewrite_sequence b/test/test2.rewrite_sequence index 896c783a..9142f53c 100644 Binary files a/test/test2.rewrite_sequence and b/test/test2.rewrite_sequence differ diff --git a/test/test2.rewrite_skip b/test/test2.rewrite_skip index 54173d79..5dec8961 100644 Binary files a/test/test2.rewrite_skip and b/test/test2.rewrite_skip differ diff --git a/test/test2.rewrite_tos b/test/test2.rewrite_tos index e11718e2..1b72e48e 100644 Binary files a/test/test2.rewrite_tos and b/test/test2.rewrite_tos differ diff --git a/test/test2.rewrite_trunc b/test/test2.rewrite_trunc index 13f39320..c0f39d75 100644 Binary files a/test/test2.rewrite_trunc and b/test/test2.rewrite_trunc differ diff --git a/test/test2.rewrite_vlan802.1ad b/test/test2.rewrite_vlan802.1ad index 8ced66d6..f2a2d96a 100644 Binary files a/test/test2.rewrite_vlan802.1ad and b/test/test2.rewrite_vlan802.1ad differ diff --git a/test/test2.rewrite_vlandel b/test/test2.rewrite_vlandel index 13f39320..c0f39d75 100644 Binary files a/test/test2.rewrite_vlandel and b/test/test2.rewrite_vlandel differ