diff options
-rw-r--r-- | usr.bin/netstat/inet.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index fb25bbe..495404e 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -186,7 +186,8 @@ protopr(u_long proto, /* for sysctl version we pass proto # */ continue; if (!aflag && ( - (af1 == AF_INET && + (istcp && tp->t_state == TCPS_LISTEN) + || (af1 == AF_INET && inet_lnaof(inp->inp_laddr) == INADDR_ANY) #ifdef INET6 || (af1 == AF_INET6 && |