Skip to content

Commit a942ec8

Browse files
committed
Reset last_time between loop iterations. This closes #85
1 parent bdb7d2e commit a942ec8

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

docs/CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11

2+
06/19/2014 Version 4.0.5-beta1
3+
- Second loop iteration at full speed (#85)
4+
- PF_RING libpcap support (#82)
5+
26
03/22/2014 Version 4.0.4
37
- Number of packets inaccurate when using --netmap method (#76)
48
- Unexpected packet counts with --loop and --cachefile enabled (#75)

src/send_packets.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,8 @@ send_packets(tcpreplay_t *ctx, pcap_t *pcap, int idx)
469469
bool do_not_timestamp = options->speed.mode == speed_topspeed ||
470470
(options->speed.mode == speed_mbpsrate && !options->speed.speed);
471471

472+
init_timestamp(&ctx->stats.last_time);
473+
init_timestamp(&ctx->stats.last_print);
472474
init_timestamp(&ctx->stats.end_time);
473475
start_us = TIMEVAL_TO_MICROSEC(&ctx->stats.start_time);
474476

@@ -645,6 +647,8 @@ send_dual_packets(tcpreplay_t *ctx, pcap_t *pcap1, int cache_file_idx1, pcap_t *
645647
bool do_not_timestamp = options->speed.mode == speed_topspeed ||
646648
(options->speed.mode == speed_mbpsrate && !options->speed.speed);
647649

650+
init_timestamp(&ctx->stats.last_time);
651+
init_timestamp(&ctx->stats.last_print);
648652
init_timestamp(&ctx->stats.end_time);
649653
start_us = TIMEVAL_TO_MICROSEC(&ctx->stats.start_time);
650654

0 commit comments

Comments
 (0)