Make netstat(1) more closely follow documented behaviour. If a TCP
socket in LISTEN state happens to be bound to an interface, it will show up in netstat(1) output even without the -a switch. As the definition of "sockets used by server processes" is a difficult one to qualify with regards to UDP, do not change the output behaviour for UDP sockets. PR: bin/26359
This commit is contained in:
parent
0aa70a0bbc
commit
6f2c3ad82d
@ -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 &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user