summaryrefslogtreecommitdiffstats
path: root/src/vnet/pg/cli.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2018-05-16 11:34:35 -0400
committerDamjan Marion <dmarion.lists@gmail.com>2018-05-17 06:27:34 +0000
commit78c568905724af785e90185fd89fa8717b3b35c2 (patch)
tree85f5c35f4cef17be2490b4d3033ff07c71414556 /src/vnet/pg/cli.c
parent26d6fd7f4deb67480c54eeff81aca36a8182dc0d (diff)
Packet generator: preserve pcap file timestamps
Set vnet_buffer2(b0)->pg_replay_timestamp, for use when desired. Fix a memory leak in pg_stream_free(...), which wasn't freeing the replay packet templates. Change-Id: I01822a9e91a52de4774d2b95cf0c2ee254a915e9 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vnet/pg/cli.c')
-rw-r--r--src/vnet/pg/cli.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vnet/pg/cli.c b/src/vnet/pg/cli.c
index 3c249a7b5f1..745b9b2bf69 100644
--- a/src/vnet/pg/cli.c
+++ b/src/vnet/pg/cli.c
@@ -228,6 +228,7 @@ pg_pcap_read (pg_stream_t * s, char *file_name)
pm.file_name = file_name;
error = pcap_read (&pm);
s->replay_packet_templates = pm.packets_read;
+ s->replay_packet_timestamps = pm.timestamps;
s->min_packet_bytes = pm.min_packet_bytes;
s->max_packet_bytes = pm.max_packet_bytes;
s->buffer_bytes = pm.max_packet_bytes;