summaryrefslogtreecommitdiff
path: root/trafgen_l3.c
diff options
context:
space:
mode:
Diffstat (limited to 'trafgen_l3.c')
-rw-r--r--trafgen_l3.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/trafgen_l3.c b/trafgen_l3.c
index 9e5126a..58eaa01 100644
--- a/trafgen_l3.c
+++ b/trafgen_l3.c
@@ -37,9 +37,7 @@ static void ipv4_header_init(struct proto_hdr *hdr)
lower = proto_lower_default_add(hdr, PROTO_ETH);
- if (lower->id == PROTO_ETH)
- proto_field_set_default_be16(lower, ETH_TYPE, ETH_P_IP);
- else if (lower->id == PROTO_IP4)
+ if (lower->id == PROTO_IP4)
proto_field_set_default_u8(lower, IP4_PROTO, IPPROTO_IPIP);
proto_header_fields_add(hdr, ipv4_fields, array_size(ipv4_fields));