summaryrefslogtreecommitdiff
blob: 8e01989fe6fe2f2b4152511c632c5a505f9935ae (plain)
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));