Fix two types which resulted in setting the address long wrong
for IPv6 addresses. Reported by: pfg@ CID: 1347086 MFC after: 1 week
This commit is contained in:
parent
546781a748
commit
55a87f85cf
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=301216
@ -390,7 +390,7 @@ gather_sctp(void)
|
|||||||
if (sock->family == AF_INET)
|
if (sock->family == AF_INET)
|
||||||
sock->laddr->address.ss_len = sizeof(struct sockaddr_in);
|
sock->laddr->address.ss_len = sizeof(struct sockaddr_in);
|
||||||
else
|
else
|
||||||
sock->laddr->address.ss_len = sizeof(struct sockaddr_in);
|
sock->laddr->address.ss_len = sizeof(struct sockaddr_in6);
|
||||||
local_all_loopback = 0;
|
local_all_loopback = 0;
|
||||||
}
|
}
|
||||||
if ((sock->faddr = calloc(1, sizeof(struct addr))) == NULL)
|
if ((sock->faddr = calloc(1, sizeof(struct addr))) == NULL)
|
||||||
@ -399,7 +399,7 @@ gather_sctp(void)
|
|||||||
if (sock->family == AF_INET)
|
if (sock->family == AF_INET)
|
||||||
sock->faddr->address.ss_len = sizeof(struct sockaddr_in);
|
sock->faddr->address.ss_len = sizeof(struct sockaddr_in);
|
||||||
else
|
else
|
||||||
sock->faddr->address.ss_len = sizeof(struct sockaddr_in);
|
sock->faddr->address.ss_len = sizeof(struct sockaddr_in6);
|
||||||
no_stcb = 1;
|
no_stcb = 1;
|
||||||
while (offset < len) {
|
while (offset < len) {
|
||||||
xstcb = (struct xsctp_tcb *)(void *)(buf + offset);
|
xstcb = (struct xsctp_tcb *)(void *)(buf + offset);
|
||||||
|
Loading…
Reference in New Issue
Block a user