11 lines
330 B
Diff
11 lines
330 B
Diff
--- 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));
|