diff options
author | 2017-05-04 14:23:00 +0000 | |
---|---|---|
committer | 2017-05-04 14:23:00 +0000 | |
commit | b680e6f3613f9ce68d35f4b71ebb268476eccd6d (patch) | |
tree | aa85584c5ab97f25bb3b2b46d381c6152528431d | |
parent | Reset the MLD default ip6_opts by using ip6_initpktopts(). This fixes a (diff) | |
download | wireguard-openbsd-b680e6f3613f9ce68d35f4b71ebb268476eccd6d.tar.xz wireguard-openbsd-b680e6f3613f9ce68d35f4b71ebb268476eccd6d.zip |
For TCP sockets netstat -A must print the address of the TCP protocol
control block. This is documented in fstat(1) and makes it possible
to compare the values from both tools.
OK sthen@
-rw-r--r-- | usr.bin/netstat/inet.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index e7ce2a96d70..dc73340bf44 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inet.c,v 1.156 2017/03/07 23:35:06 jca Exp $ */ +/* $OpenBSD: inet.c,v 1.157 2017/05/04 14:23:00 bluhm Exp $ */ /* $NetBSD: inet.c,v 1.14 1995/10/03 21:42:37 thorpej Exp $ */ /* @@ -315,7 +315,8 @@ netdomainpr(struct kinfo_file *kf, int proto) } if (Aflag) - printf("%#*llx%s ", FAKE_PTR(kf->so_pcb)); + printf("%#*llx%s ", FAKE_PTR(kf->so_protocol == IPPROTO_TCP ? + kf->inp_ppcb : kf->so_pcb)); printf("%-7.7s %6llu %6llu ", isip6 ? name6: name, kf->so_rcv_cc, kf->so_snd_cc); |