1 2 3 4 5 6 7 8 9 10 11
--- a/src/tcptable.c +++ b/src/tcptable.c @@ -437,6 +437,8 @@ static char *tcplog_flowrate_msg(struct tcptableent *entry, char *buf, size_t bufsize) { time_t interval = time(NULL) - entry->conn_starttime; + if (interval < 1) + interval = 1; char rbuf[64]; rate_print(entry->bcount / interval, rbuf, sizeof(rbuf));