diff --git a/docs/CHANGELOG b/docs/CHANGELOG index fcbe2da9..57c75d5f 100644 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -1,6 +1,7 @@ -06/19/2021 Version 4.4.0-beta1 +06/19/2021 Version 4.4.0-beta2 - add a security policy document (#689) - ability to specify directory of pcap files (#682) + - incorrect PPS rate for long-running sessions (#679) - option --skipbroadcast not working (#677) - add feature VLAN Q-in-Q (#625) diff --git a/src/send_packets.c b/src/send_packets.c index 003e5f7f..9d0169d8 100644 --- a/src/send_packets.c +++ b/src/send_packets.c @@ -1081,7 +1081,7 @@ static void calc_sleep_time(tcpreplay_t *ctx, struct timeval *pkt_ts_delta, if ((pkts_sent < COUNTER_OVERFLOW_RISK)) next_tx_us = (pkts_sent * 1000000) * (60 * 60) / pph; else - next_tx_us = (pkts_sent * 1000000) / pph / (60 * 60); + next_tx_us = ((pkts_sent * 1000000) / pph) * (60 * 60); if (next_tx_us > tx_us) NANOSEC_TO_TIMESPEC((next_tx_us - tx_us) * 1000, &ctx->nap);