diff options
Diffstat (limited to 'trafgen_parser.y')
-rw-r--r-- | trafgen_parser.y | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/trafgen_parser.y b/trafgen_parser.y index 74015b5..38f170a 100644 --- a/trafgen_parser.y +++ b/trafgen_parser.y @@ -169,6 +169,8 @@ static inline void __setup_new_csum16(struct csum16 *s, off_t from, off_t to, struct packet *realloc_packet(void) { + uint32_t i; + if (test_ignore()) return NULL; @@ -185,6 +187,9 @@ struct packet *realloc_packet(void) __init_new_csum_slot(&packet_dyn[packetd_last]); __init_new_fields_slot(&packet_dyn[packetd_last]); + for (i = 0; i < plen; i++) + packets[i].id = i; + return &packets[packet_last]; } |