Date: Thu, 2 Jun 2016 17:31:37 +0000 (UTC) From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301216 - head/usr.bin/sockstat Message-ID: <201606021731.u52HVbgt085314@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tuexen Date: Thu Jun 2 17:31:37 2016 New Revision: 301216 URL: https://svnweb.freebsd.org/changeset/base/301216 Log: Fix two types which resulted in setting the address long wrong for IPv6 addresses. Reported by: pfg@ CID: 1347086 MFC after: 1 week Modified: head/usr.bin/sockstat/sockstat.c Modified: head/usr.bin/sockstat/sockstat.c ============================================================================== --- head/usr.bin/sockstat/sockstat.c Thu Jun 2 17:28:39 2016 (r301215) +++ head/usr.bin/sockstat/sockstat.c Thu Jun 2 17:31:37 2016 (r301216) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606021731.u52HVbgt085314>