diff options
author | tuexen <tuexen@FreeBSD.org> | 2016-06-02 17:31:37 +0000 |
---|---|---|
committer | tuexen <tuexen@FreeBSD.org> | 2016-06-02 17:31:37 +0000 |
commit | 56e3e42896aee2eb336ee7d14417f427bbf2f505 (patch) | |
tree | 12a9342351ec22b7884b308a14a93afb6271f4a1 /usr.bin/sockstat | |
parent | 68a5cf5d8697ad3def03f782aeb01dc4d1015b47 (diff) | |
download | FreeBSD-src-56e3e42896aee2eb336ee7d14417f427bbf2f505.zip FreeBSD-src-56e3e42896aee2eb336ee7d14417f427bbf2f505.tar.gz |
Fix two types which resulted in setting the address long wrong
for IPv6 addresses.
Reported by: pfg@
CID: 1347086
MFC after: 1 week
Diffstat (limited to 'usr.bin/sockstat')
-rw-r--r-- | usr.bin/sockstat/sockstat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/sockstat/sockstat.c b/usr.bin/sockstat/sockstat.c index 98d86b5..7d533d0 100644 --- a/usr.bin/sockstat/sockstat.c +++ b/usr.bin/sockstat/sockstat.c @@ -390,7 +390,7 @@ gather_sctp(void) if (sock->family == AF_INET) sock->laddr->address.ss_len = sizeof(struct sockaddr_in); else - sock->laddr->address.ss_len = sizeof(struct sockaddr_in); + sock->laddr->address.ss_len = sizeof(struct sockaddr_in6); local_all_loopback = 0; } if ((sock->faddr = calloc(1, sizeof(struct addr))) == NULL) @@ -399,7 +399,7 @@ gather_sctp(void) if (sock->family == AF_INET) sock->faddr->address.ss_len = sizeof(struct sockaddr_in); else - sock->faddr->address.ss_len = sizeof(struct sockaddr_in); + sock->faddr->address.ss_len = sizeof(struct sockaddr_in6); no_stcb = 1; while (offset < len) { xstcb = (struct xsctp_tcb *)(void *)(buf + offset); |