netstat(1): negative tcp timer counters

Mikolaj Golub trociny at freebsd.org
Sun Jul 1 15:26:26 UTC 2012


Hi,

I have noticed that `netstat -x' shows negative values for keep timer. In my
case this is for connections in CLOSE state.

Reviewing the timer code it looks like there is an issue in tcp_timer_*
functions, when inp is checked for INP_DROPPED. If the flag is set the
function returns and callout_deactivate() is never called. Adding some prints
I made sure that observed negative counters in my case were due to this check.

The attached patch (check for INP_DROPPED after callout_deactivate) fixes the
issue for me. I would like to commit it if there are no objections.

-- 
Mikolaj Golub

-------------- next part --------------
A non-text attachment was scrubbed...
Name: tcp_timer.c.INP_DROPPED.1.patch
Type: text/x-patch
Size: 3540 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20120701/155bef98/tcp_timer.c.INP_DROPPED.1.bin


More information about the freebsd-net mailing list