From 3ed5ec6e5911841b00287d9ee536159a1abde496 Mon Sep 17 00:00:00 2001 From: Fred Klassen Date: Sun, 30 Jan 2022 09:29:30 -0800 Subject: [PATCH 1/4] Feature #563 record Ethernet src/dst modified state --- src/tcpedit/plugins/dlt_en10mb/en10mb.c | 8 ++++++-- src/tcpedit/plugins/dlt_en10mb/en10mb_types.h | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/tcpedit/plugins/dlt_en10mb/en10mb.c b/src/tcpedit/plugins/dlt_en10mb/en10mb.c index ea010f73..606d7148 100644 --- a/src/tcpedit/plugins/dlt_en10mb/en10mb.c +++ b/src/tcpedit/plugins/dlt_en10mb/en10mb.c @@ -587,7 +587,9 @@ dlt_en10mb_encode(tcpeditdlt_t *ctx, u_char *packet, int pktlen, tcpr_dir_t dir) memcpy(eth->ether_shost, ctx->srcaddr.ethernet, ETHER_ADDR_LEN); } } else if (ctx->addr_type == ETHERNET) { - memcpy(eth->ether_shost, ctx->srcaddr.ethernet, ETHER_ADDR_LEN); + extra->src_modified = memcmp(eth->ether_shost, ctx->srcaddr.ethernet, ETHER_ADDR_LEN); + if (extra->src_modified) + memcpy(eth->ether_shost, ctx->srcaddr.ethernet, ETHER_ADDR_LEN); } else { tcpedit_seterr(ctx->tcpedit, "%s", "Please provide a source address"); return TCPEDIT_ERROR; @@ -603,7 +605,9 @@ dlt_en10mb_encode(tcpeditdlt_t *ctx, u_char *packet, int pktlen, tcpr_dir_t dir) memcpy(eth->ether_dhost, ctx->dstaddr.ethernet, ETHER_ADDR_LEN); } } else if (ctx->addr_type == ETHERNET) { - memcpy(eth->ether_dhost, ctx->dstaddr.ethernet, ETHER_ADDR_LEN); + extra->dst_modified = memcmp(eth->ether_dhost, ctx->dstaddr.ethernet, ETHER_ADDR_LEN); + if (extra->dst_modified) + memcpy(eth->ether_dhost, ctx->dstaddr.ethernet, ETHER_ADDR_LEN); } else { tcpedit_seterr(ctx->tcpedit, "%s", "Please provide a destination address"); return TCPEDIT_ERROR; diff --git a/src/tcpedit/plugins/dlt_en10mb/en10mb_types.h b/src/tcpedit/plugins/dlt_en10mb/en10mb_types.h index ace155f3..c4cd831d 100644 --- a/src/tcpedit/plugins/dlt_en10mb/en10mb_types.h +++ b/src/tcpedit/plugins/dlt_en10mb/en10mb_types.h @@ -35,6 +35,8 @@ typedef struct { u_int16_t vlan_pri; u_int16_t vlan_cfi; u_int16_t vlan_proto; + bool src_modified; + bool dst_modified; } en10mb_extra_t; typedef enum { From cc4def9d2278164014d6cbd8532e448d561d0cb6 Mon Sep 17 00:00:00 2001 From: Fred Klassen Date: Sun, 30 Jan 2022 10:52:58 -0800 Subject: [PATCH 2/4] Feature #563 IPv6 support for plugin_merge_layer3() --- src/tcpedit/fuzzing.c | 6 +++++- src/tcpedit/plugins/dlt_en10mb/en10mb.c | 16 +++++++++++++--- src/tcpedit/plugins/dlt_en10mb/en10mb.h | 6 +++++- src/tcpedit/plugins/dlt_hdlc/hdlc.c | 10 +++++++--- src/tcpedit/plugins/dlt_hdlc/hdlc.h | 6 +++++- src/tcpedit/plugins/dlt_ieee80211/ieee80211.c | 10 +++++++--- src/tcpedit/plugins/dlt_ieee80211/ieee80211.h | 6 +++++- src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether.c | 10 +++++++--- src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether.h | 6 +++++- src/tcpedit/plugins/dlt_linuxsll/linuxsll.c | 10 +++++++--- src/tcpedit/plugins/dlt_linuxsll/linuxsll.h | 6 +++++- src/tcpedit/plugins/dlt_null/null.c | 11 +++++++---- src/tcpedit/plugins/dlt_null/null.h | 6 +++++- src/tcpedit/plugins/dlt_plugins.c | 11 ++++++++--- src/tcpedit/plugins/dlt_pppserial/pppserial.c | 11 +++++++---- src/tcpedit/plugins/dlt_pppserial/pppserial.h | 6 +++++- src/tcpedit/plugins/dlt_radiotap/radiotap.c | 10 +++++++--- src/tcpedit/plugins/dlt_radiotap/radiotap.h | 6 +++++- src/tcpedit/plugins/dlt_raw/raw.c | 9 ++++++--- src/tcpedit/plugins/dlt_raw/raw.h | 6 +++++- src/tcpedit/plugins/dlt_user/user.c | 10 +++++++--- src/tcpedit/plugins/dlt_user/user.h | 6 +++++- src/tcpedit/plugins_api.h | 7 ++++++- src/tcpedit/plugins_types.h | 2 +- src/tcpedit/tcpedit.c | 6 +++++- 25 files changed, 150 insertions(+), 49 deletions(-) diff --git a/src/tcpedit/fuzzing.c b/src/tcpedit/fuzzing.c index 847ef587..c9905e2f 100644 --- a/src/tcpedit/fuzzing.c +++ b/src/tcpedit/fuzzing.c @@ -307,7 +307,11 @@ fuzzing(tcpedit_t *tcpedit, struct pcap_pkthdr *pkthdr, } /* in cases where 'l3data' is a working buffer, copy it back to '*pkthdr' */ - plugin->plugin_merge_layer3(ctx, packet, caplen, l3data); + plugin->plugin_merge_layer3(ctx, + packet, + caplen, + (l2proto == ETHERTYPE_IP) ? l4data : NULL, + (l2proto == ETHERTYPE_IPV6) ? l4data : NULL); done: return packet_changed; diff --git a/src/tcpedit/plugins/dlt_en10mb/en10mb.c b/src/tcpedit/plugins/dlt_en10mb/en10mb.c index 606d7148..33d96988 100644 --- a/src/tcpedit/plugins/dlt_en10mb/en10mb.c +++ b/src/tcpedit/plugins/dlt_en10mb/en10mb.c @@ -789,18 +789,28 @@ dlt_en10mb_get_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen) * like SPARC */ u_char * -dlt_en10mb_merge_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen, u_char *l3data) +dlt_en10mb_merge_layer3(tcpeditdlt_t *ctx, + u_char *packet, + const int pktlen, + u_char *ipv4_data, + u_char *ipv6_data) { + en10mb_extra_t *extra; int l2len; + assert(ctx); assert(packet); - assert(l3data); + if (!ipv4_data && !ipv6_data) + return NULL; + l2len = dlt_en10mb_l2len(ctx, packet, pktlen); if (l2len == -1 || pktlen < l2len) return NULL; - return tcpedit_dlt_l3data_merge(ctx, packet, pktlen, l3data, l2len); + assert(ctx->decoded_extra_size == sizeof(*extra)); + extra = (en10mb_extra_t *)ctx->decoded_extra; + return tcpedit_dlt_l3data_merge(ctx, packet, pktlen, ipv4_data ?: ipv6_data, l2len); } /* diff --git a/src/tcpedit/plugins/dlt_en10mb/en10mb.h b/src/tcpedit/plugins/dlt_en10mb/en10mb.h index 54d783c9..2b842476 100644 --- a/src/tcpedit/plugins/dlt_en10mb/en10mb.h +++ b/src/tcpedit/plugins/dlt_en10mb/en10mb.h @@ -42,7 +42,11 @@ int dlt_en10mb_decode(tcpeditdlt_t *ctx, const u_char *packet, const int pktlen) int dlt_en10mb_encode(tcpeditdlt_t *ctx, u_char *packet, int pktlen, tcpr_dir_t dir); int dlt_en10mb_proto(tcpeditdlt_t *ctx, const u_char *packet, const int pktlen); u_char *dlt_en10mb_get_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen); -u_char *dlt_en10mb_merge_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen, u_char *l3data); +u_char *dlt_en10mb_merge_layer3(tcpeditdlt_t *ctx, + u_char *packet, + const int pktlen, + u_char *ipv4_data, + u_char *ipv6_data); int dlt_en10mb_l2len(tcpeditdlt_t *ctx, const u_char *packet, const int pktlen); u_char *dlt_en10mb_get_mac(tcpeditdlt_t *ctx, tcpeditdlt_mac_type_t mac, const u_char *packet, const int pktlen); diff --git a/src/tcpedit/plugins/dlt_hdlc/hdlc.c b/src/tcpedit/plugins/dlt_hdlc/hdlc.c index d61a4815..37ac448f 100644 --- a/src/tcpedit/plugins/dlt_hdlc/hdlc.c +++ b/src/tcpedit/plugins/dlt_hdlc/hdlc.c @@ -339,18 +339,22 @@ dlt_hdlc_get_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen) * like SPARC */ u_char * -dlt_hdlc_merge_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen, u_char *l3data) +dlt_hdlc_merge_layer3(tcpeditdlt_t *ctx, + u_char *packet, + const int pktlen, + u_char *ipv4_data, + u_char *ipv6_data) { int l2len; assert(ctx); assert(packet); - assert(l3data); + assert(ipv4_data || ipv6_data); l2len = dlt_hdlc_l2len(ctx, packet, pktlen); if (l2len == -1 || pktlen < l2len) return NULL; - return tcpedit_dlt_l3data_merge(ctx, packet, pktlen, l3data, l2len); + return tcpedit_dlt_l3data_merge(ctx, packet, pktlen, ipv4_data ?: ipv6_data, l2len); } /* diff --git a/src/tcpedit/plugins/dlt_hdlc/hdlc.h b/src/tcpedit/plugins/dlt_hdlc/hdlc.h index e102457f..b09d9992 100644 --- a/src/tcpedit/plugins/dlt_hdlc/hdlc.h +++ b/src/tcpedit/plugins/dlt_hdlc/hdlc.h @@ -33,7 +33,11 @@ int dlt_hdlc_decode(tcpeditdlt_t *ctx, const u_char *packet, const int pktlen); int dlt_hdlc_encode(tcpeditdlt_t *ctx, u_char *packet, int pktlen, tcpr_dir_t dir); int dlt_hdlc_proto(tcpeditdlt_t *ctx, const u_char *packet, const int pktlen); u_char *dlt_hdlc_get_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen); -u_char *dlt_hdlc_merge_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen, u_char *l3data); +u_char *dlt_hdlc_merge_layer3(tcpeditdlt_t *ctx, + u_char *packet, + const int pktlen, + u_char *ipv4_data, + u_char *ipv6_data); tcpeditdlt_l2addr_type_t dlt_hdlc_l2addr_type(void); int dlt_hdlc_l2len(tcpeditdlt_t *ctx, const u_char *packet, const int pktlen); u_char *dlt_hdlc_get_mac(tcpeditdlt_t *ctx, tcpeditdlt_mac_type_t mac, const u_char *packet, const int pktlen); diff --git a/src/tcpedit/plugins/dlt_ieee80211/ieee80211.c b/src/tcpedit/plugins/dlt_ieee80211/ieee80211.c index 50d3d46c..15d086ba 100644 --- a/src/tcpedit/plugins/dlt_ieee80211/ieee80211.c +++ b/src/tcpedit/plugins/dlt_ieee80211/ieee80211.c @@ -305,18 +305,22 @@ dlt_ieee80211_get_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen) * like SPARC */ u_char * -dlt_ieee80211_merge_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen, u_char *l3data) +dlt_ieee80211_merge_layer3(tcpeditdlt_t *ctx, + u_char *packet, + const int pktlen, + u_char *ipv4_data, + u_char *ipv6_data) { int l2len; assert(ctx); assert(packet); - assert(l3data); + assert(ipv4_data || ipv6_data); l2len = dlt_ieee80211_l2len(ctx, packet, pktlen); if (l2len == -1 || pktlen < l2len) return NULL; - return tcpedit_dlt_l3data_merge(ctx, packet, pktlen, l3data, l2len); + return tcpedit_dlt_l3data_merge(ctx, packet, pktlen, ipv4_data ?: ipv6_data, l2len); } /* diff --git a/src/tcpedit/plugins/dlt_ieee80211/ieee80211.h b/src/tcpedit/plugins/dlt_ieee80211/ieee80211.h index de558723..b2f9c26c 100644 --- a/src/tcpedit/plugins/dlt_ieee80211/ieee80211.h +++ b/src/tcpedit/plugins/dlt_ieee80211/ieee80211.h @@ -37,7 +37,11 @@ int dlt_ieee80211_decode(tcpeditdlt_t *ctx, const u_char *packet, const int pktl int dlt_ieee80211_encode(tcpeditdlt_t *ctx, u_char *packet, int pktlen, tcpr_dir_t dir); int dlt_ieee80211_proto(tcpeditdlt_t *ctx, const u_char *packet, const int pktlen); u_char *dlt_ieee80211_get_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen); -u_char *dlt_ieee80211_merge_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen, u_char *l3data); +u_char *dlt_ieee80211_merge_layer3(tcpeditdlt_t *ctx, + u_char *packet, + const int pktlen, + u_char *ipv4_data, + u_char *ipv6_data); tcpeditdlt_l2addr_type_t dlt_ieee80211_l2addr_type(void); int dlt_ieee80211_l2len(tcpeditdlt_t *ctx, const u_char *packet, const int pktlen); u_char *dlt_ieee80211_get_mac(tcpeditdlt_t *ctx, tcpeditdlt_mac_type_t mac, const u_char *packet, const int pktlen); diff --git a/src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether.c b/src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether.c index fafb0482..b7d05cdb 100644 --- a/src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether.c +++ b/src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether.c @@ -353,18 +353,22 @@ dlt_jnpr_ether_get_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen) * like SPARC */ u_char * -dlt_jnpr_ether_merge_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen, u_char *l3data) +dlt_jnpr_ether_merge_layer3(tcpeditdlt_t *ctx, + u_char *packet, + const int pktlen, + u_char *ipv4_data, + u_char *ipv6_data) { int l2len; assert(ctx); assert(packet); - assert(l3data); + assert(ipv4_data || ipv6_data); l2len = dlt_jnpr_ether_l2len(ctx, packet, pktlen); if (l2len == -1 || pktlen < l2len) return NULL; - return tcpedit_dlt_l3data_merge(ctx, packet, pktlen, l3data, l2len); + return tcpedit_dlt_l3data_merge(ctx, packet, pktlen, ipv4_data ?: ipv6_data, l2len); } /* diff --git a/src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether.h b/src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether.h index 4a4f34f3..d7ca2464 100644 --- a/src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether.h +++ b/src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether.h @@ -45,7 +45,11 @@ int dlt_jnpr_ether_decode(tcpeditdlt_t *ctx, const u_char *packet, const int pkt int dlt_jnpr_ether_encode(tcpeditdlt_t *ctx, u_char *packet, int pktlen, tcpr_dir_t dir); int dlt_jnpr_ether_proto(tcpeditdlt_t *ctx, const u_char *packet, const int pktlen); u_char *dlt_jnpr_ether_get_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen); -u_char *dlt_jnpr_ether_merge_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen, u_char *l3data); +u_char *dlt_jnpr_ether_merge_layer3(tcpeditdlt_t *ctx, + u_char *packet, + const int pktlen, + u_char *ipv4_data, + u_char *ipv6_data); tcpeditdlt_l2addr_type_t dlt_jnpr_ether_l2addr_type(void); int dlt_jnpr_ether_l2len(tcpeditdlt_t *ctx, const u_char *packet, const int pktlen); u_char *dlt_jnpr_ether_get_mac(tcpeditdlt_t *ctx, tcpeditdlt_mac_type_t mac, const u_char *packet, const int pktlen); diff --git a/src/tcpedit/plugins/dlt_linuxsll/linuxsll.c b/src/tcpedit/plugins/dlt_linuxsll/linuxsll.c index c6a6eba5..4c171db7 100644 --- a/src/tcpedit/plugins/dlt_linuxsll/linuxsll.c +++ b/src/tcpedit/plugins/dlt_linuxsll/linuxsll.c @@ -256,18 +256,22 @@ dlt_linuxsll_get_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen) * like SPARC */ u_char * -dlt_linuxsll_merge_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen, u_char *l3data) +dlt_linuxsll_merge_layer3(tcpeditdlt_t *ctx, + u_char *packet, + const int pktlen, + u_char *ipv4_data, + u_char *ipv6_data) { int l2len; assert(ctx); assert(packet); - assert(l3data); + assert(ipv4_data || ipv6_data); l2len = dlt_linuxsll_l2len(ctx, packet, pktlen); if (l2len == -1 || pktlen < l2len) return NULL; - return tcpedit_dlt_l3data_merge(ctx, packet, pktlen, l3data, l2len); + return tcpedit_dlt_l3data_merge(ctx, packet, pktlen, ipv4_data ?: ipv6_data, l2len); } /* diff --git a/src/tcpedit/plugins/dlt_linuxsll/linuxsll.h b/src/tcpedit/plugins/dlt_linuxsll/linuxsll.h index 8e6b0188..42a461c9 100644 --- a/src/tcpedit/plugins/dlt_linuxsll/linuxsll.h +++ b/src/tcpedit/plugins/dlt_linuxsll/linuxsll.h @@ -37,7 +37,11 @@ int dlt_linuxsll_decode(tcpeditdlt_t *ctx, const u_char *packet, const int pktle int dlt_linuxsll_encode(tcpeditdlt_t *ctx, u_char *packet, int pktlen, tcpr_dir_t dir); int dlt_linuxsll_proto(tcpeditdlt_t *ctx, const u_char *packet, const int pktlen); u_char *dlt_linuxsll_get_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen); -u_char *dlt_linuxsll_merge_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen, u_char *l3data); +u_char *dlt_linuxsll_merge_layer3(tcpeditdlt_t *ctx, + u_char *packet, + const int pktlen, + u_char *ipv4_data, + u_char *ipv6_data); tcpeditdlt_l2addr_type_t dlt_linuxsll_l2addr_type(void); int dlt_linuxsll_l2len(tcpeditdlt_t *ctx, const u_char *packet, const int pktlen); u_char *dlt_linuxsll_get_mac(tcpeditdlt_t *ctx, tcpeditdlt_mac_type_t mac, const u_char *packet, const int pktlen); diff --git a/src/tcpedit/plugins/dlt_null/null.c b/src/tcpedit/plugins/dlt_null/null.c index 7465dff8..f33fc971 100644 --- a/src/tcpedit/plugins/dlt_null/null.c +++ b/src/tcpedit/plugins/dlt_null/null.c @@ -265,19 +265,22 @@ dlt_null_get_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen) * like SPARC */ u_char * -dlt_null_merge_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen, u_char *l3data) +dlt_null_merge_layer3(tcpeditdlt_t *ctx, + u_char *packet, + const int pktlen, + u_char *ipv4_data, + u_char *ipv6_data) { int l2len; assert(ctx); assert(packet); - assert(l3data); + assert(ipv4_data || ipv6_data); l2len = dlt_null_l2len(ctx, packet, pktlen); - if (pktlen < l2len) return NULL; - return tcpedit_dlt_l3data_merge(ctx, packet, pktlen, l3data, l2len); + return tcpedit_dlt_l3data_merge(ctx, packet, pktlen, ipv4_data ?: ipv6_data, l2len); } /* diff --git a/src/tcpedit/plugins/dlt_null/null.h b/src/tcpedit/plugins/dlt_null/null.h index d0a65f5b..be1054b2 100644 --- a/src/tcpedit/plugins/dlt_null/null.h +++ b/src/tcpedit/plugins/dlt_null/null.h @@ -35,7 +35,11 @@ int dlt_null_decode(tcpeditdlt_t *ctx, const u_char *packet, const int pktlen); int dlt_null_encode(tcpeditdlt_t *ctx, u_char *packet, int pktlen, tcpr_dir_t dir); int dlt_null_proto(tcpeditdlt_t *ctx, const u_char *packet, const int pktlen); u_char *dlt_null_get_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen); -u_char *dlt_null_merge_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen, u_char *l3data); +u_char *dlt_null_merge_layer3(tcpeditdlt_t *ctx, + u_char *packet, + const int pktlen, + u_char *ipv4_data, + u_char *ipv6_data); tcpeditdlt_l2addr_type_t dlt_null_l2addr_type(void); int dlt_null_l2len(tcpeditdlt_t *ctx, const u_char *packet, const int pktlen); u_char *dlt_null_get_mac(tcpeditdlt_t *ctx, tcpeditdlt_mac_type_t mac, const u_char *packet, const int pktlen); diff --git a/src/tcpedit/plugins/dlt_plugins.c b/src/tcpedit/plugins/dlt_plugins.c index 5e8140ac..837937e6 100644 --- a/src/tcpedit/plugins/dlt_plugins.c +++ b/src/tcpedit/plugins/dlt_plugins.c @@ -377,7 +377,12 @@ tcpedit_dlt_l3data(tcpeditdlt_t *ctx, int dlt, u_char *packet, const int pktlen) * or Cisco HDLC (4 byte header) but is critical for std ethernet (12 byte header) */ u_char * -tcpedit_dlt_merge_l3data(tcpeditdlt_t *ctx, int dlt, u_char *packet, const int pktlen, u_char *l3data) +tcpedit_dlt_merge_l3data(tcpeditdlt_t *ctx, + int dlt, + u_char *packet, + const int pktlen, + u_char *ipv4_data, + u_char *ipv6_data) { tcpeditdlt_plugin_t *plugin; u_char *res; @@ -386,7 +391,7 @@ tcpedit_dlt_merge_l3data(tcpeditdlt_t *ctx, int dlt, u_char *packet, const int p assert(dlt >= 0); assert(packet); - if (l3data == NULL) + if (ipv4_data == NULL && ipv6_data == NULL) return packet; if ((plugin = tcpedit_dlt_getplugin(ctx, dlt)) == NULL) { @@ -394,7 +399,7 @@ tcpedit_dlt_merge_l3data(tcpeditdlt_t *ctx, int dlt, u_char *packet, const int p return NULL; } - res = plugin->plugin_merge_layer3(ctx, packet, pktlen, l3data); + res = plugin->plugin_merge_layer3(ctx, packet, pktlen, ipv4_data, ipv6_data); if (res == NULL) tcpedit_seterr(ctx->tcpedit, "Packet length %d is to short for layer 3 merge for DLT 0x%04x", pktlen, dlt); diff --git a/src/tcpedit/plugins/dlt_pppserial/pppserial.c b/src/tcpedit/plugins/dlt_pppserial/pppserial.c index 8d8012dd..8a983819 100644 --- a/src/tcpedit/plugins/dlt_pppserial/pppserial.c +++ b/src/tcpedit/plugins/dlt_pppserial/pppserial.c @@ -315,19 +315,22 @@ dlt_pppserial_get_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen) * like SPARC */ u_char * -dlt_pppserial_merge_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen, u_char *l3data) +dlt_pppserial_merge_layer3(tcpeditdlt_t *ctx, + u_char *packet, + const int pktlen, + u_char *ipv4_data, + u_char *ipv6_data) { int l2len; assert(ctx); assert(packet); - assert(l3data); + assert(ipv4_data || ipv6_data); - /* FIXME: Is there anything else we need to do?? */ l2len = dlt_pppserial_l2len(ctx, packet, pktlen); if (l2len == -1 || pktlen < l2len) return NULL; - return tcpedit_dlt_l3data_merge(ctx, packet, pktlen, l3data, l2len); + return tcpedit_dlt_l3data_merge(ctx, packet, pktlen, ipv4_data ?: ipv6_data, l2len); } /* diff --git a/src/tcpedit/plugins/dlt_pppserial/pppserial.h b/src/tcpedit/plugins/dlt_pppserial/pppserial.h index 407a3357..71fb1536 100644 --- a/src/tcpedit/plugins/dlt_pppserial/pppserial.h +++ b/src/tcpedit/plugins/dlt_pppserial/pppserial.h @@ -32,7 +32,11 @@ int dlt_pppserial_decode(tcpeditdlt_t *ctx, const u_char *packet, const int pktl int dlt_pppserial_encode(tcpeditdlt_t *ctx, u_char *packet, int pktlen, tcpr_dir_t dir); int dlt_pppserial_proto(tcpeditdlt_t *ctx, const u_char *packet, const int pktlen); u_char *dlt_pppserial_get_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen); -u_char *dlt_pppserial_merge_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen, u_char *l3data); +u_char *dlt_pppserial_merge_layer3(tcpeditdlt_t *ctx, + u_char *packet, + const int pktlen, + u_char *ipv4_data, + u_char *ipv6_data); tcpeditdlt_l2addr_type_t dlt_pppserial_l2addr_type(void); int dlt_pppserial_l2len(tcpeditdlt_t *ctx, const u_char *packet, const int pktlen); u_char *dlt_pppserial_get_mac(tcpeditdlt_t *ctx, tcpeditdlt_mac_type_t mac, const u_char *packet, const int pktlen); diff --git a/src/tcpedit/plugins/dlt_radiotap/radiotap.c b/src/tcpedit/plugins/dlt_radiotap/radiotap.c index 41e4f56a..42906bf6 100644 --- a/src/tcpedit/plugins/dlt_radiotap/radiotap.c +++ b/src/tcpedit/plugins/dlt_radiotap/radiotap.c @@ -267,19 +267,23 @@ dlt_radiotap_get_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen) * like SPARC */ u_char * -dlt_radiotap_merge_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen, u_char *l3data) +dlt_radiotap_merge_layer3(tcpeditdlt_t *ctx, + u_char *packet, + const int pktlen, + u_char *ipv4_data, + u_char *ipv6_data) { int radiolen, l2len; u_char *data; assert(ctx); assert(packet); - assert(l3data); + assert(ipv4_data || ipv6_data); radiolen = dlt_radiotap_l2len(ctx, packet, pktlen); data = dlt_radiotap_get_80211(ctx, packet, pktlen, radiolen); l2len = dlt_ieee80211_l2len(ctx, data, pktlen); - return tcpedit_dlt_l3data_merge(ctx, data, pktlen - radiolen, l3data, l2len); + return tcpedit_dlt_l3data_merge(ctx, data, pktlen - radiolen, ipv4_data ?: ipv6_data, l2len); } /* diff --git a/src/tcpedit/plugins/dlt_radiotap/radiotap.h b/src/tcpedit/plugins/dlt_radiotap/radiotap.h index 63ec196f..f4d3dc0c 100644 --- a/src/tcpedit/plugins/dlt_radiotap/radiotap.h +++ b/src/tcpedit/plugins/dlt_radiotap/radiotap.h @@ -32,7 +32,11 @@ int dlt_radiotap_decode(tcpeditdlt_t *ctx, const u_char *packet, const int pktle int dlt_radiotap_encode(tcpeditdlt_t *ctx, u_char *packet, int pktlen, tcpr_dir_t dir); int dlt_radiotap_proto(tcpeditdlt_t *ctx, const u_char *packet, const int pktlen); u_char *dlt_radiotap_get_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen); -u_char *dlt_radiotap_merge_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen, u_char *l3data); +u_char *dlt_radiotap_merge_layer3(tcpeditdlt_t *ctx, + u_char *packet, + const int pktlen, + u_char *ipv4_data, + u_char *ipv6_data); tcpeditdlt_l2addr_type_t dlt_radiotap_l2addr_type(void); int dlt_radiotap_l2len(tcpeditdlt_t *ctx, const u_char *packet, const int pktlen); int dlt_radiotap_80211_l2len(tcpeditdlt_t *ctx, const u_char *packet, const int pktlen); diff --git a/src/tcpedit/plugins/dlt_raw/raw.c b/src/tcpedit/plugins/dlt_raw/raw.c index d7b9f742..e3b46a64 100644 --- a/src/tcpedit/plugins/dlt_raw/raw.c +++ b/src/tcpedit/plugins/dlt_raw/raw.c @@ -254,12 +254,15 @@ dlt_raw_get_layer3(tcpeditdlt_t *ctx, u_char *packet, _U_ const int pktlen) * like SPARC */ u_char * -dlt_raw_merge_layer3(tcpeditdlt_t *ctx, u_char *packet, _U_ const int pktlen, - u_char *l3data) +dlt_raw_merge_layer3(tcpeditdlt_t *ctx, + u_char *packet, _U_ + const int pktlen, + u_char *ipv4_data, + u_char *ipv6_data) { assert(ctx); assert(packet); - assert(l3data); + assert(ipv4_data || ipv6_data); /* raw has a zero byte header, so this is basically a non-op */ diff --git a/src/tcpedit/plugins/dlt_raw/raw.h b/src/tcpedit/plugins/dlt_raw/raw.h index 3c3a57a0..41893c5b 100644 --- a/src/tcpedit/plugins/dlt_raw/raw.h +++ b/src/tcpedit/plugins/dlt_raw/raw.h @@ -31,7 +31,11 @@ int dlt_raw_decode(tcpeditdlt_t *ctx, const u_char *packet, const int pktlen); int dlt_raw_encode(tcpeditdlt_t *ctx, u_char *packet, int pktlen, tcpr_dir_t dir); int dlt_raw_proto(tcpeditdlt_t *ctx, const u_char *packet, const int pktlen); u_char *dlt_raw_get_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen); -u_char *dlt_raw_merge_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen, u_char *l3data); +u_char *dlt_raw_merge_layer3(tcpeditdlt_t *ctx, + u_char *packet, + const int pktlen, + u_char *ipv4_data, + u_char *ipv6_data); tcpeditdlt_l2addr_type_t dlt_raw_l2addr_type(void); int dlt_raw_l2len(tcpeditdlt_t *ctx, const u_char *packet, const int pktlen); u_char *dlt_raw_get_mac(tcpeditdlt_t *ctx, tcpeditdlt_mac_type_t mac, const u_char *packet, const int pktlen); diff --git a/src/tcpedit/plugins/dlt_user/user.c b/src/tcpedit/plugins/dlt_user/user.c index 8c34e795..07cd0fce 100644 --- a/src/tcpedit/plugins/dlt_user/user.c +++ b/src/tcpedit/plugins/dlt_user/user.c @@ -309,19 +309,23 @@ dlt_user_get_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen) * like SPARC */ u_char * -dlt_user_merge_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen, u_char *l3data) +dlt_user_merge_layer3(tcpeditdlt_t *ctx, + u_char *packet, + const int pktlen, + u_char *ipv4_data, + u_char *ipv6_data) { int l2len; assert(ctx); assert(packet); - assert(l3data); + assert(ipv4_data || ipv6_data); /* FIXME: Is there anything else we need to do?? */ l2len = dlt_user_l2len(ctx, packet, pktlen); if (l2len == TCPEDIT_ERROR || pktlen < l2len) return NULL; - return tcpedit_dlt_l3data_merge(ctx, packet, pktlen, l3data, l2len); + return tcpedit_dlt_l3data_merge(ctx, packet, pktlen, ipv4_data ?: ipv6_data, l2len); } /* diff --git a/src/tcpedit/plugins/dlt_user/user.h b/src/tcpedit/plugins/dlt_user/user.h index b23103ca..947a2687 100644 --- a/src/tcpedit/plugins/dlt_user/user.h +++ b/src/tcpedit/plugins/dlt_user/user.h @@ -36,7 +36,11 @@ int dlt_user_decode(tcpeditdlt_t *ctx, const u_char *packet, const int pktlen); int dlt_user_encode(tcpeditdlt_t *ctx, u_char *packet, int pktlen, tcpr_dir_t dir); int dlt_user_proto(tcpeditdlt_t *ctx, const u_char *packet, const int pktlen); u_char *dlt_user_get_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen); -u_char *dlt_user_merge_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen, u_char *l3data); +u_char *dlt_user_merge_layer3(tcpeditdlt_t *ctx, + u_char *packet, + const int pktlen, + u_char *ipv4_data, + u_char *ipv6_data); tcpeditdlt_l2addr_type_t dlt_user_l2addr_type(void); int dlt_user_l2len(tcpeditdlt_t *ctx, const u_char *packet, const int pktlen); u_char *dlt_user_get_mac(tcpeditdlt_t *ctx, tcpeditdlt_mac_type_t mac, const u_char *packet, const int pktlen); diff --git a/src/tcpedit/plugins_api.h b/src/tcpedit/plugins_api.h index 0cf1a1bd..344d1a03 100644 --- a/src/tcpedit/plugins_api.h +++ b/src/tcpedit/plugins_api.h @@ -69,7 +69,12 @@ int tcpedit_dlt_proto(tcpeditdlt_t *ctx, int dlt, const u_char *packet, const in u_char *tcpedit_dlt_l3data(tcpeditdlt_t *ctx, int dlt, u_char *packet, const int pktlen); /* merge the L2 & L3 (possibly changed?) after calling tcpedit_dlt_l3data() */ -u_char *tcpedit_dlt_merge_l3data(tcpeditdlt_t *ctx, int dlt, u_char *packet, const int pktlen, u_char *l3data); +u_char *tcpedit_dlt_merge_l3data(tcpeditdlt_t *ctx, + int dlt, + u_char *packet, + const int pktlen, + u_char *ipv4_data, + u_char *ipv6_data); int tcpedit_dlt_src(tcpeditdlt_t *ctx); diff --git a/src/tcpedit/plugins_types.h b/src/tcpedit/plugins_types.h index d97f7f32..8807f472 100644 --- a/src/tcpedit/plugins_types.h +++ b/src/tcpedit/plugins_types.h @@ -88,7 +88,7 @@ struct tcpeditdlt_plugin_s { int (*plugin_proto)(tcpeditdlt_t *, const u_char *, const int); int (*plugin_l2len)(tcpeditdlt_t *, const u_char *, const int); u_char *(*plugin_get_layer3)(tcpeditdlt_t *, u_char *, const int); - u_char *(*plugin_merge_layer3)(tcpeditdlt_t *, u_char *, const int, u_char *); + u_char *(*plugin_merge_layer3)(tcpeditdlt_t *, u_char *, const int, u_char *, u_char *); tcpeditdlt_l2addr_type_t (*plugin_l2addr_type)(void); u_char *(*plugin_get_mac)(tcpeditdlt_t *, tcpeditdlt_mac_type_t, const u_char *, const int); void *config; /* user configuration data for the encoder */ diff --git a/src/tcpedit/tcpedit.c b/src/tcpedit/tcpedit.c index 93073c3a..433efa1a 100644 --- a/src/tcpedit/tcpedit.c +++ b/src/tcpedit/tcpedit.c @@ -363,7 +363,11 @@ tcpedit_packet(tcpedit_t *tcpedit, struct pcap_pkthdr **pkthdr, } } - tcpedit_dlt_merge_l3data(tcpedit->dlt_ctx, dst_dlt, packet, (*pkthdr)->caplen, (u_char *)ip_hdr); + tcpedit_dlt_merge_l3data(tcpedit->dlt_ctx, + dst_dlt, packet, + (*pkthdr)->caplen, + (u_char*)ip_hdr, + (u_char*)ip6_hdr); tcpedit->runtime.total_bytes += (*pkthdr)->caplen; tcpedit->runtime.pkts_edited ++; From 64d065076b0d7b2b649ae9b2660b0710f3ae7b2e Mon Sep 17 00:00:00 2001 From: Fred Klassen Date: Sun, 30 Jan 2022 18:42:18 -0800 Subject: [PATCH 3/4] Feature #563 update MAC for multicast addresses More information here... http://www.dqnetworks.ie/toolsinfo.d/multicastaddressing.html --- docs/CHANGELOG | 11 ++-- src/tcpedit/edit_packet.c | 5 +- src/tcpedit/edit_packet.h | 9 +++ src/tcpedit/plugins/dlt_en10mb/en10mb.c | 82 ++++++++++++++++++++++--- 4 files changed, 89 insertions(+), 18 deletions(-) diff --git a/docs/CHANGELOG b/docs/CHANGELOG index f627e90c..c4cf7b6c 100644 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -1,17 +1,16 @@ -06/19/2021 Version 4.4.0-beta2 +06/19/2021 Version 4.4.0 - remove obsolete FORCE_ALIGN support to fix macOS 11 compile (#695) - add a security policy document (#689) - ability to specify directory of pcap files (#682) - incorrect PPS rate for long-running sessions (#679) - - revert #630 to fix --multiplier issues (#674) - option --skipbroadcast not working (#677) - - latest macOS SDK selected by default (#668) - - add feature VLAN Q-in-Q (#625) - -06/19/2021 Version 4.3.5-beta1f + - revert #630 to fix --multiplier issues (#674) - gcc 9.3 compiler warnings (#670) - installed netmap not automatically detected (#669) + - latest macOS SDK selected by default (#668) - heap-buffer-overflow with flow_decode() (#665) + - add feature VLAN Q-in-Q (#625) + - add feature update Ethernet MAC on multicast IP (#563) 04/01/2021 Version 4.3.4 - ASAN reports memory leaks while running tests (#662) diff --git a/src/tcpedit/edit_packet.c b/src/tcpedit/edit_packet.c index 7ca42fb2..d6e21add 100644 --- a/src/tcpedit/edit_packet.c +++ b/src/tcpedit/edit_packet.c @@ -1102,8 +1102,8 @@ is_unicast_ipv4(tcpedit_t *tcpedit, uint32_t ip) { assert(tcpedit); - /* multicast/broadcast is 224.0.0.0 or greater */ - if (ntohl(ip) > 3758096384) + /* multicast/broadcast is 224.0.0.0 to 239.255.255.255 */ + if ((ntohl(ip) & 0xf0000000) == 0xe0000000) return 0; return 1; @@ -1123,4 +1123,3 @@ is_multicast_ipv6(tcpedit_t *tcpedit, struct tcpr_in6_addr *addr) return 0; } - diff --git a/src/tcpedit/edit_packet.h b/src/tcpedit/edit_packet.h index 8d4cb1c1..f841a5ba 100644 --- a/src/tcpedit/edit_packet.h +++ b/src/tcpedit/edit_packet.h @@ -61,6 +61,15 @@ int rewrite_ipv4_ttl(tcpedit_t *tcpedit, ipv4_hdr_t *ip_hdr); int rewrite_ipv6_hlim(tcpedit_t *tcpedit, ipv6_hdr_t *ip6_hdr); +int extract_ipv4_multicast_mac(tcpedit_t *tcpedit, + uint32_t ip, + u_char *mac[ETHER_ADDR_LEN]); + +int extract_ipv6_multicast_mac(tcpedit_t *tcpedit, + struct tcpr_in6_addr *ip6, + u_char *mac[ETHER_ADDR_LEN]); + + #define BROADCAST_IP 4294967295 #endif diff --git a/src/tcpedit/plugins/dlt_en10mb/en10mb.c b/src/tcpedit/plugins/dlt_en10mb/en10mb.c index 33d96988..671572ec 100644 --- a/src/tcpedit/plugins/dlt_en10mb/en10mb.c +++ b/src/tcpedit/plugins/dlt_en10mb/en10mb.c @@ -588,8 +588,7 @@ dlt_en10mb_encode(tcpeditdlt_t *ctx, u_char *packet, int pktlen, tcpr_dir_t dir) } } else if (ctx->addr_type == ETHERNET) { extra->src_modified = memcmp(eth->ether_shost, ctx->srcaddr.ethernet, ETHER_ADDR_LEN); - if (extra->src_modified) - memcpy(eth->ether_shost, ctx->srcaddr.ethernet, ETHER_ADDR_LEN); + memcpy(eth->ether_shost, ctx->srcaddr.ethernet, ETHER_ADDR_LEN); } else { tcpedit_seterr(ctx->tcpedit, "%s", "Please provide a source address"); return TCPEDIT_ERROR; @@ -606,8 +605,7 @@ dlt_en10mb_encode(tcpeditdlt_t *ctx, u_char *packet, int pktlen, tcpr_dir_t dir) } } else if (ctx->addr_type == ETHERNET) { extra->dst_modified = memcmp(eth->ether_dhost, ctx->dstaddr.ethernet, ETHER_ADDR_LEN); - if (extra->dst_modified) - memcpy(eth->ether_dhost, ctx->dstaddr.ethernet, ETHER_ADDR_LEN); + memcpy(eth->ether_dhost, ctx->dstaddr.ethernet, ETHER_ADDR_LEN); } else { tcpedit_seterr(ctx->tcpedit, "%s", "Please provide a destination address"); return TCPEDIT_ERROR; @@ -782,6 +780,44 @@ dlt_en10mb_get_layer3(tcpeditdlt_t *ctx, u_char *packet, const int pktlen) return tcpedit_dlt_l3data_copy(ctx, packet, pktlen, l2len); } +/* + * Modify MAC address if IPv4 address is Multicast (#563) + * ip: 32-bit IP address in network order + * mac: pointer to packet ethernet source or destination address (6 bytes) + */ +static void dlt_en10mb_ipv4_multicast_mac_update(const uint32_t ip, + uint8_t mac[]) +{ + /* only modify multicast packets */ + if ((ntohl(ip) & 0xf0000000) != 0xe0000000) + return; + + mac[2] = (ntohl(ip) & 0x7fffff); + mac[0] =0x01; + mac[1] =0x0; + mac[2] =0x5e; +} + +/* + * Modify MAC address if IPv4 address is Multicast (#563) + * ip6: 128-bit IPv6 address in network order + * mac: pointer to packet ethernet source or destination address (6 bytes) + */ +static void dlt_en10mb_ipv6_multicast_mac_update(const struct tcpr_in6_addr *ip6, + uint8_t mac[]) +{ + /* only modify multicast packets */ + if (ip6->tcpr_s6_addr[0] == 0xff) + return; + + mac[0] = 0x33; + mac[1] = 0x33; + mac[2] = ip6->tcpr_s6_addr[12]; + mac[3] = ip6->tcpr_s6_addr[13]; + mac[4] = ip6->tcpr_s6_addr[14]; + mac[5] = ip6->tcpr_s6_addr[15]; +} + /* * function merges the packet (containing L2 and old L3) with the l3data buffer * containing the new l3 data. Note, if L2 % 4 == 0, then they're pointing to the @@ -796,21 +832,49 @@ dlt_en10mb_merge_layer3(tcpeditdlt_t *ctx, u_char *ipv6_data) { en10mb_extra_t *extra; + struct tcpr_ethernet_hdr *eth; + int l2len; assert(ctx); assert(packet); - if (!ipv4_data && !ipv6_data) - return NULL; - l2len = dlt_en10mb_l2len(ctx, packet, pktlen); if (l2len == -1 || pktlen < l2len) return NULL; - + assert(ctx->decoded_extra_size == sizeof(*extra)); extra = (en10mb_extra_t *)ctx->decoded_extra; - return tcpedit_dlt_l3data_merge(ctx, packet, pktlen, ipv4_data ?: ipv6_data, l2len); + eth = (struct tcpr_ethernet_hdr *)(packet + ctx->l2offset); + assert(eth); + /* modify source/destination MAC if source/destination IP is multicast */ + if (ipv4_data) { + if ((size_t)pktlen >= sizeof(*eth) + sizeof(struct tcpr_ipv4_hdr)) { + struct tcpr_ipv4_hdr *ip_hdr = (struct tcpr_ipv4_hdr*)ipv4_data; + if (!extra->src_modified) + dlt_en10mb_ipv4_multicast_mac_update(ip_hdr->ip_src.s_addr, + eth->ether_shost); + + if (!extra->dst_modified) + dlt_en10mb_ipv4_multicast_mac_update(ip_hdr->ip_dst.s_addr, + eth->ether_dhost); + } + return tcpedit_dlt_l3data_merge(ctx, packet, pktlen, ipv4_data, l2len); + } else if (ipv6_data) { + if ((size_t)pktlen >= sizeof(*eth) + sizeof(struct tcpr_ipv6_hdr)) { + struct tcpr_ipv6_hdr *ip6_hdr = (struct tcpr_ipv6_hdr*)ipv6_data; + if (!extra->src_modified) + dlt_en10mb_ipv6_multicast_mac_update(&ip6_hdr->ip_src, + eth->ether_shost); + + if (!extra->dst_modified) + dlt_en10mb_ipv6_multicast_mac_update(&ip6_hdr->ip_dst, + eth->ether_dhost); + } + return tcpedit_dlt_l3data_merge(ctx, packet, pktlen, ipv6_data, l2len); + } + + return NULL; } /* From 7f106b810ded6939c3bba73b642adccb95b4f96a Mon Sep 17 00:00:00 2001 From: Fred Klassen Date: Sun, 30 Jan 2022 18:50:14 -0800 Subject: [PATCH 4/4] Feature #563 update test standards --- test/test.rewrite_1ttl | Bin 71888 -> 71888 bytes test/test.rewrite_2ttl | Bin 71888 -> 71888 bytes test/test.rewrite_3ttl | Bin 71888 -> 71888 bytes test/test.rewrite_config | Bin 72600 -> 72600 bytes test/test.rewrite_efcs | Bin 71172 -> 71172 bytes test/test.rewrite_endpoint | Bin 71888 -> 71888 bytes test/test.rewrite_enet_subsmac | Bin 71888 -> 71888 bytes test/test.rewrite_fixcsum | Bin 71888 -> 71888 bytes test/test.rewrite_fixlen_del | Bin 71888 -> 71888 bytes test/test.rewrite_fixlen_pad | Bin 71888 -> 71888 bytes test/test.rewrite_fixlen_trunc | Bin 71888 -> 71888 bytes test/test.rewrite_l7fuzzing | Bin 66533 -> 66533 bytes test/test.rewrite_mac | Bin 71888 -> 71888 bytes test/test.rewrite_mac_seed | Bin 71888 -> 71888 bytes test/test.rewrite_mac_seed_keep | Bin 71888 -> 71888 bytes test/test.rewrite_mtutrunc | Bin 30758 -> 30758 bytes test/test.rewrite_pad | Bin 71888 -> 71888 bytes test/test.rewrite_pnat | Bin 71888 -> 71888 bytes test/test.rewrite_portmap | Bin 71888 -> 71888 bytes test/test.rewrite_range_portmap | Bin 71888 -> 71888 bytes test/test.rewrite_seed | Bin 71888 -> 71888 bytes test/test.rewrite_sequence | Bin 71888 -> 71888 bytes test/test.rewrite_skip | Bin 70358 -> 70358 bytes test/test.rewrite_tos | Bin 71888 -> 71888 bytes test/test.rewrite_trunc | Bin 71888 -> 71888 bytes test/test.rewrite_vlan802.1ad | Bin 72600 -> 72600 bytes test/test.rewrite_vlandel | Bin 71888 -> 71888 bytes test/test2.rewrite_1ttl | Bin 71888 -> 71888 bytes test/test2.rewrite_2ttl | Bin 71888 -> 71888 bytes test/test2.rewrite_3ttl | Bin 71888 -> 71888 bytes test/test2.rewrite_config | Bin 72600 -> 72600 bytes test/test2.rewrite_efcs | Bin 71172 -> 71172 bytes test/test2.rewrite_endpoint | Bin 71888 -> 71888 bytes test/test2.rewrite_enet_subsmac | Bin 71888 -> 71888 bytes test/test2.rewrite_fixcsum | Bin 71888 -> 71888 bytes test/test2.rewrite_fixlen_del | Bin 71888 -> 71888 bytes test/test2.rewrite_fixlen_pad | Bin 71888 -> 71888 bytes test/test2.rewrite_fixlen_trunc | Bin 71888 -> 71888 bytes test/test2.rewrite_l7fuzzing | Bin 66533 -> 66533 bytes test/test2.rewrite_mac | Bin 71888 -> 71888 bytes test/test2.rewrite_mac_seed | Bin 71888 -> 71888 bytes test/test2.rewrite_mac_seed_keep | Bin 71888 -> 71888 bytes test/test2.rewrite_mtutrunc | Bin 30758 -> 30758 bytes test/test2.rewrite_pad | Bin 71888 -> 71888 bytes test/test2.rewrite_pnat | Bin 71888 -> 71888 bytes test/test2.rewrite_portmap | Bin 71888 -> 71888 bytes test/test2.rewrite_range_portmap | Bin 71888 -> 71888 bytes test/test2.rewrite_seed | Bin 71888 -> 71888 bytes test/test2.rewrite_sequence | Bin 71888 -> 71888 bytes test/test2.rewrite_skip | Bin 70358 -> 70358 bytes test/test2.rewrite_tos | Bin 71888 -> 71888 bytes test/test2.rewrite_trunc | Bin 71888 -> 71888 bytes test/test2.rewrite_vlan802.1ad | Bin 72600 -> 72600 bytes test/test2.rewrite_vlandel | Bin 71888 -> 71888 bytes 54 files changed, 0 insertions(+), 0 deletions(-) diff --git a/test/test.rewrite_1ttl b/test/test.rewrite_1ttl index 216deb1a0a2c239c445a245a1f1afffb27c00da3..0867afe655b09e55c9ef97993059659911213a15 100644 GIT binary patch delta 238 zcmcbxk>$chmJPRAm>C)3Cf{T61k+lqFxq1CI@X_JBF4rULTq!4jqCqk*xYtEfx(G^ zL1S{Fvc}}cGDbWQVTh8+in38a0fg$w-bx0Ox68_*3Oho6eLl-cgd`C$fMc?HAn5qmncPYDl1psZ(SI__e delta 238 zcmcbxk>$chmJPRAm>HCeC*Nc71k+lqFxq1CI@X_JB2(-ST@Kp2Mm~Fu`mMIR2@FmQ z3>uRYl{F?mmNDXi2t$-iR+Nq6K~_E4TghPZc3C-8!H2T$chmJPRAm>C)3Cf{T61k+lqFxq1CI@X_JBF4rULTq!4jqCqk*xYtEfx(G^ zL1S{Fvc}}cGDbWQVTh8+in38a0fg$w-bx0Ox68_*3Oho6eLl-cgd`C$fMc?HAn5qmncPYDl1psZ(SI__e delta 238 zcmcbxk>$chmJPRAm>HCeC*Nc71k+lqFxq1CI@X_JB2(-ST@Kp2Mm~Fu`mMIR2@FmQ z3>uRYl{F?mmNDXi2t$-iR+Nq6K~_E4TghPZc3C-8!H2T$chmJPRAm>C)3Cf{T61k+lqFxq1CI@X_JBF4rULTq!4jqCqk*xYtEfx(G^ zL1S{Fvc}}cGDbWQVTh8+in38a0fg$w-bx0Ox68_*3Oho6eLl-cgd`C$fMc?HAn5qmncPYDl1psZ(SI__e delta 238 zcmcbxk>$chmJPRAm>HCeC*Nc71k+lqFxq1CI@X_JB2(-ST@Kp2Mm~Fu`mMIR2@FmQ z3>uRYl{F?mmNDXi2t$-iR+Nq6K~_E4TghPZc3C-8!H2TzcL)z%MG)gTX2g)nRLDtTFERDFiZ)|2^^(cECD9E758 Taz9uA$(4r6rkj;i%Dw{tSfWkk delta 222 zcmbQSon^*$mJR%@%nVA#lZ9A)!E_RY-n@x5Rh(yv{h`Z2d)LTkuTj4>Sy?uX2f~C1 zPo63phpNI**<`Y@oE)lPtlVQ%ZT&!14f1j*f}2;#%QBe)1f*|&0E7reaBF4rULTq!4jqCqk*xYtE zfx(G^L1VI_lE&m>89g3|Fht4ZwK8Eq0fg$w{IXuyv@Zo~x0hv~JV$m3suB5029s;# pq)-GmFOm~wMmN}C@@GYmG8EekCVMKO>Ybdge)1f*|&0E7reaB2(-ST@Kp2Mm~Fu`mMIR z2@FmQ3>uRal{6+7%joeygds{MuayboK~_DPU)Bqo_N8F$_Ok4g=g2NWH6mZhU~-L| m6pG;HMRKCd=mr~1{;Vj4Dd?$$s&{g}k{5=m&0m%HKLY@O>1MeA diff --git a/test/test.rewrite_endpoint b/test/test.rewrite_endpoint index 058ce28a5c3fe7364bf355b91b6d339ed3fbeb56..a740d14047ba7d00d0fa52a3fee294bed46bbd88 100644 GIT binary patch delta 209 zcmcbxk>$chmJQ2gM2w9ygxKa78`uB8u(|DS0)rC+gT~}UWsS*?WsGt!lb2*h)#t6`hb~|~`Hqq}ioVJJ NF;y9E?oxL93IMRvP*wl{ delta 209 zcmcbxk>$chmJQ2gM5fpux*W83jePbR^;>Os6BwKr7&Im)Dr-!BEMvq25r!z4tSB4B zgRFY8x01o+?Xq&Hf)8cyqiXvPRP{$r4n=UYn!F@4sy=TeKXd`}$#;~*QS?pzkEzOV JbC$chmJPRAm>C)3Cf{T61k+lqFxq1CI@X_JBF4rULTq!4jqCqk*xYtEfx(G^ zL1S{Fvc}}cGDbWQVTh8+in38a0fg$w-bx0Ox68_*3Oho6eLl-cgd`C$fMc?HAn5qmncPYDl1psZ(SI__e delta 238 zcmcbxk>$chmJPRAm>HCeC*Nc71k+lqFxq1CI@X_JB2(-ST@Kp2Mm~Fu`mMIR2@FmQ z3>uRYl{F?mmNDXi2t$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-8!H2THn-hPU~pn! z(3spWt2z0Jj3Ez17@}mdqHGjU0HJ!ax03Yab24I+cgV`3N<5UkkE->IoF9t7W;J<9 zW}pa{OJa$!u}4Tq0MIaPR6`)9i%#C8B!{AR@*O3RVHob<-<+VVk_z(V=Jt-bY5;w$ BT2lZ3 delta 255 zcmaFb&hoUKWy5V2W(FnW$@f@1!L$}DjJDXkj`gRQ$Q1iSmxK1Mk9dXqFn+9tP diff --git a/test/test.rewrite_mac b/test/test.rewrite_mac index 7fe5db3dd9d9b5cf2bd55cb976fb4a65ed6fba0c..3a47cab50006970b41f7f7bfe85eb90ca9010cbc 100644 GIT binary patch delta 265 zcmcbxk>$chmJL@~I2jq@L`21a|1nh=Ztha{JI4(4@aEeezp4QMziwTJ delta 265 zcmcbxk>$chmJL@~I2nY5MMT9Il#D0eV{t~}X|ba6EH$chmJPRAm>C)3Cf{T61k+lqFxq1CI@X_JBF4rULTq!4jqCqk*xYtEfx(G^ zL1S{Fvc}}cGDbWQVTh8+in38a0fg$w-bx0Ox68_*3Oho6eLl-cgd`C$fMc?HAn5qmncPYDl1psZ(SI__e delta 238 zcmcbxk>$chmJPRAn3tp*PQJ(D38uAJVYJ2Ob*w+dMAnohufM)FC3NM!+~aL`6BwKr z7&Im)Dr-!BEMvq25r!z4tSB4BgRFY8x01o+?Xq&Hf)8cyqiXvPRP{$r4n=UYn!F@4 dsy=TeKXd`}$#;~*QS?pzkEzOVbC$chmJPRAm>C)3Cf{T61k+lqFxq1CI@X_JBF4rULTq!4jqCqk*xYtEfx(G^ zL1S{Fvc}}cGDbWQVTh8+in38a0fg$w-bx0Ox68_*3Oho6eLl-cgd`C$fMc?HAn5qmncPYDl1psZ(SI__e delta 238 zcmcbxk>$chmJPRAm>HCeC*Nc71k+lqFxq1CI@X_JB2(-St-ro@jePdL+~aL`6BwKr z7&Im)Dr-!BEMvq25r!z4tSB4BgRFY8x01o+?Xq&Hf)8cyqiXvPRP{$r4n=UYn!F@4 dsy=TeKXd`}$#;~*QS?pzkEzOVbCF diff --git a/test/test.rewrite_mtutrunc b/test/test.rewrite_mtutrunc index 164597615ab83620ab0db1516b8721017f0dddcc..aa69870423c7d83acae91563923805d48f0e9a2d 100644 GIT binary patch delta 254 zcmZ4XfpOUf#tpYwm>C)3Cf{T6M58S>uVdxm;4wDN5MrBSY+V2U!sf}xc#}jROo(vX z-2`5anG6b(9R)Ner}Al{s-7rhF!>ap98d?s2%ruICkBS4lh5&LPFCe#2h;&F8KPwJ ueSSX_fz6fzc8utT8cyaDVw=26P#l|tEQ)@hfd-S)h2&6FZk{MKH5CBw99v`n delta 254 zcmZ4XfpOUf#tpYwm>HCeC*Nc7M58S>uVdxm;F)57=yK5BHS*bO)Nf5b#+xJpVM2u4 z?k4bZ%w$lQ>?oi)Ih9WnRrN$6gUP4(X2!P{YZ5LTr$chmJPRAm>C)3Cf{T61k+lqFxq1CI@X_JBF4rULTq!4jqCqk*xYtEfx(G^ zL1S{Fvc}}cGDbWQVTh8+in38a0fg$w-bx0Ox68_*3Oho6eLl-cgd`C$fMc?HAn5qmncPYDl1psZ(SI__e delta 238 zcmcbxk>$chmJPRAm>HCeC*Nc71k+lqFxq1CI@X_JB2(-ST@Kp2Mm~Fu`mMIR2@FmQ z3>uRYl{F?mmNDXi2t$-iR+Nq6K~_E4TghPZc3C-8!H2T$chmJPRAm>C)3Cf{T61k+lqFxq1CI@X_JBF4rULTq!4jqCqk*xYtEfx(G^ zL1S{Fvc}}cGDbWQVTh8+in38a0fg$w-bx0Ox68_*3Oho6eLl-cgd`C$fMc?HAn5qmncPYDl1psZ(SI__e delta 238 zcmcbxk>$chmJPRAm>HCeC*Nc71k+lqFxq1CI@X_JB2(-ST@Kp2Mm~Fu`mMIR2@FmQ z3>uRYl{F?mmNDXi2t$-iR+Nq6K~_E4TghPZc3C-8!H2T$chmJPRAm>C)3Cf{T61k+lqFxq1CI@X_JBF4rULTq!4jqCqk*xYtEfx(G^ zL1S{Fvc}}cGDbWQVTh8+in38a0fg$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-b1$Z3b29Y6A@ndnYDFuqnRIdc0spdjM2ZV;Dr!2=I>UBjQ=*MjOQMxjPoIg%+y0rf&LQ^frlrc zN^hTo$ZWoP<&g;3{kvXXVg$K=^Ssv^xH#b{Wpntq$E=gTG7C=j{!@q$o_zFAEm$=8 zFS6*_zYx*rf5@U&|3O5P|09du{SOwMn$7qgVea;1M#eSFNPG!aMjm9oE(fC@D?)xc nkT0=)4lm;pMkGN`e#YrY+?S}_P5~5IO+ggyNmOp85MwR?NC7$x diff --git a/test/test.rewrite_tos b/test/test.rewrite_tos index 18e3a4a48a0189402db191a413f4fdcd448f428e..afb19d5260ded21fc2b3bf2321a0b2c13489e273 100644 GIT binary patch delta 238 zcmcbxk>$chmJPRAm>C)3Cf{T61k+lqFxq1CI@X_JBF4rULTq!4jqCqk*xYtEfx(G^ zL1S{Fvc}}cGDbWQVTh8+in38a0fg$w-bx0Ox68_*3Oho6eLl-cgd`C$fMc?HAn5qmncPYDl1psZ(SI__e delta 238 zcmcbxk>$chmJPRAm>HCeC*Nc71k+lqFxq1CI@X_JB2(-ST@Kp2Mm~Fu`mMIR2@FmQ z3>uRYl{F?mmNDXi2t$-iR+Nq6K~_E4TghPZc3C-8!H2T$chmJPRAm>C)3Cf{T61k+lqFxq1CI@X_JBF4rULTq!4jqCqk*xYtEfx(G^ zL1S{Fvc}}cGDbWQVTh8+in38a0fg$w-bx0Ox68_*3Oho6eLl-cgd`C$fMc?HAn5qmncPYDl1psZ(SI__e delta 238 zcmcbxk>$chmJPRAm>HCeC*Nc71k+lqFxq1CI@X_JB2(-ST@Kp2Mm~Fu`mMIR2@FmQ z3>uRYl{F?mmNDXi2t$-iR+Nq6K~_E4TghPZc3C-8!H2TzcL)z%MG)gTX2g)nRLDtTFERDFiZ)|2^^(cECD9E758 Taz9uA$(4r6rkj;i%Dw{tSfWkk delta 222 zcmbQSon^*$mJR%@%nVA#lZ9A)!E_RY-n@x5Rh(yv{h`Z2d)LTkuTj4>Sy?uX2f~C1 zP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)gTX2g)nRLDtTFERDFiZ)|2^^(cECD9E758 Taz9uA$(4r6rkj;i%Dw{tSfWkk delta 222 zcmbQSon^*$mJR%@%nVA#lZ9A)!E_RY-n@x5Rh(yv{h`Z2d)LTkuTj4>Sy?uX2f~C1 zPo63phpNI**<`Y@oE)lPtlVQ%ZT&!14f1j*f}2;#%QB89g3|Fht4ZwK8Eq0fg$w{IXuyv@Zo~x0hv~JV$m3suB5029s;# pq)-GmFOm~wMmN}C@@GYmG8EekCVMKO>YbdguRal{6+7%joeygds{MuayboK~_DPU)Bqo_N8F$_Ok4g=g2NWH6mZhU~-L| m6pG;HMRKCd=mr~1{;Vj4Dd?$$s&{g}k{5=m&0m%HKLY@O0cN-W diff --git a/test/test2.rewrite_endpoint b/test/test2.rewrite_endpoint index 58d7b43f4c548c1d8a3d08f8b5c49708125bc11b..a14818324e71119d84974e481d267b9f5a9c802a 100644 GIT binary patch delta 209 zcmcbxk>$chmJQ2gM2w9ygxKa78`uB8u(|DS0)rC+gT~}UWsS*?WsGt!lb2*h)#t6`hb~|~`Hqq}ioVJJ NF;y9E?oxL93IMRvP*wl{ delta 209 zcmcbxk>$chmJQ2gM5fpux*W83jePbR^;>Os6BwKr7&Im)Dr-!BEMvq25r!z4tSB4B zgRFY8x01o+?Xq&Hf)8cyqiXvPRP{$r4n=UYn!F@4sy=TeKXd`}$#;~*QS?pzkEzOV JbC$chmJPRAm>C)3Cf{T61k+lqFxq_cTGn4;BF4rULTq!4jqCqk*xYtEfx(G^ zL1S{Fvc}}cGDbWQVTh8+in38a0fg$w-bx0Ox68_*3Oho6eLl-cgd`C$fMc?HAn5qmncPYDl1psXTSI+$chmJPRAm>HCeC*Nc71k+lqFxq_cTGn4;B2(-ST@Kp2Mm~Fu`mMIR2@FmQ z3>uRYl{F?mmNDXi2t$-iR+Nq6K~_E4TghPZc3C-8!H2T$chmJPRAm>C)3Cf{T6M5E0&uVwuuCSq)yA;dPv*tq`xh0Seu6BwKr7&Im) zDr-!BEMvq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Jt-bY5;u9 BT2cT2 delta 255 zcmaFb&hoUKWy5V2W(FnW$@f@1!L$}Dj5goAmi3pI$Q1iSmxK1Mk9dXqFnk8!s diff --git a/test/test2.rewrite_mac b/test/test2.rewrite_mac index 72d911e42cdc8805048e4b9bdc7074567946a88b..55ef3449a771440c514374038ac4cf15ae168f2e 100644 GIT binary patch delta 265 zcmcbxk>$chmJL@~I2jq@L`21a|1nh=Ztha{JI4(4@aEeezp4QMzLi~u delta 247 zcmcbxk>$chmJL@~CYMMHPJYH>4W^A)VYL3{wXDCyL>PpGMMT9Il#E?M)7tJPFgP(V zXiQF2)|mWQ#)t=5a$chmJPRAm>C)3Cf{T61k+lqFxq_cTGn4;BF4rULTq!4jqCqk*xYtEfx(G^ zL1S{Fvc}}cGDbWQVTh8+in38a0fg$w-bx0Ox68_*3Oho6eLl-cgd`C$fMc?HAn5qmncPYDl1psXTSI+$chmJPRAn3tp*PQJ(D38uAJVYK$chmJPRAm>C)3Cf{T61k+lqFxq_cTGn4;BF4rULTq!4jqCqk*xYtEfx(G^ zL1S{Fvc}}cGDbWQVTh8+in38a0fg$w-bx0Ox68_*3Oho6eLl-cgd`C$fMc?HAn5qmncPYDl1psXTSI+$chmJPRAm>HCeC*Nc71k+lqFxq_cTGn4;B2(-St-ro@jePdL+~aL`6BwKr z7&Im)Dr-!BEMvq25r!z4tSB4BgRFY8x01o+?Xq&Hf)8cyqiXvPRP{$r4n=UYn!F@4 dsy=TeKXd`}$#;~*QS?pzkEzOVbCC)3Cf{T6M5E0&uVv-s;4wDN5MrBSY+V2U!sf}xc#}jROo(vX z-2`5anG6b(9R)Ner}Al{s-7rhF!>ap98d?s2%ruICkBS4lh5&LPFCe#2h;&F8KPwJ ueSSX_fz6fzc8utT8cyaDVw=26P#l|tEQ)@hfd-S)h2&6FZk{MKH5CBvJX>P` delta 254 zcmZ4XfpOUf#tpYwm>HCeC*Nc7M5E0&uVv-s;F)57=yK5BHS*bO)Nf5b#+xJpVM2u4 z?k4bZ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2Mm~Fu`mMIR2@FmQ z3>uRYl{F?mmNDXi2t$-iR+Nq6K~_E4TghPZc3C-8!H2TAPcW^;3Zu;@uVobiiydMO1=CV&{vdjD4x1Je zSYRdxMBp{YcUG{>Q@)R2#^jqKU@e;sMIi#4Ri&F4MU0JS8%2LJHeMNTy}9jf0)rC+ zgT~}UWsS*?WsGt! zlb2*h)#t6`hb~|~`Hqq}ioVJJF;y8(?ow6;`*edc)XS?hpgvVGvEH!l0Ut#6V?sBtc{ZlA$tOnNXR3c@UYf ze5im|DMVmVDOBm4>K;gpY1ctyn(Lr4wJi`miwnEh!7eG82$jj34mB-lE=13+xloxc zi=i?rR)S?Vt%6GYS`U?Yw-utrZ5vd^VGmTsOXnamn~z=j zC<1oUu9ue}!PWnIKNlx31&WA@fzo04x5umq?qugbl}Nm!e`=9<-hYwh&i+M~3;u^J zcl95#T=airxx4?7eyY delta 968 zcmcb%l;zq|mJQ`B)2H$<3Qg{031VhYGM;>o#S=_xvBGHc$!l4KCcpCGo_vbccd{i= zttOiTGlP)u<{UOHrpa%f@=RXD;Wjz>;Jd+h=qj->2P4-qYn7mz94ps1> z?0r;$|3FoLOyKyis)NY%)IkktYk}z5+|c!r4eXTK ziBPHX=|HLIheDGJ=R!0co(q-PyBI37eI-POa}`vEc>`4D?^cM6|2C+M=N_nx^C5`L z)I(5#{u2;^hbN#)Z=Zw6Y`%Ksk;vq(H{6>Ky*$MTa{uOeuQzaU!V|{k@NbV7QOo)EIKut@jb%a?a7RcYnYMv z60D3o$b4N6Mn6`B{B$5+V*4Ck#wCnMf}Z@0(~-C@QMsK0D6*P@DBP2%+)N?HTmbk2 BLqY%m diff --git a/test/test2.rewrite_tos b/test/test2.rewrite_tos index 9dab8d0175a0635ec551a7021318f40b76821271..e11718e29a5aca17f26f1d1dc20f44876761a884 100644 GIT binary patch delta 238 zcmcbxk>$chmJPRAm>C)3Cf{T61k+lqFxq_cTGn4;BF4rULTq!4jqCqk*xYtEfx(G^ zL1S{Fvc}}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