summaryrefslogtreecommitdiff
path: root/trafgen_proto.c
diff options
context:
space:
mode:
Diffstat (limited to 'trafgen_proto.c')
-rw-r--r--trafgen_proto.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/trafgen_proto.c b/trafgen_proto.c
index 1babba5..cb0c6ae 100644
--- a/trafgen_proto.c
+++ b/trafgen_proto.c
@@ -100,8 +100,10 @@ void proto_header_fields_add(struct proto_hdr *hdr,
f->mask = fields[i].mask;
f->pkt_offset = hdr->pkt_offset + fields[i].offset;
- if (f->pkt_offset + f->len > pkt->len)
+ if (f->pkt_offset + f->len > pkt->len) {
+ hdr->len += f->len;
set_fill(0, (f->pkt_offset + f->len) - pkt->len);
+ }
}
}