mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Report the correct length when using the IPPROTO_SCTP level
socket options SCTP_GET_PEER_ADDRESSES and SCTP_GET_LOCAL_ADDRESSES.
This commit is contained in:
parent
bd0eb4dcc4
commit
e57d481c5e
1 changed files with 3 additions and 3 deletions
|
|
@ -2240,8 +2240,8 @@ flags_out:
|
|||
SCTP_FIND_STCB(inp, stcb, saddr->sget_assoc_id);
|
||||
|
||||
if (stcb) {
|
||||
left = (*optsize) - sizeof(struct sctp_getaddresses);
|
||||
*optsize = sizeof(struct sctp_getaddresses);
|
||||
left = (*optsize) - sizeof(sctp_assoc_t);
|
||||
*optsize = sizeof(sctp_assoc_t);
|
||||
sas = (struct sockaddr_storage *)&saddr->addr[0];
|
||||
|
||||
TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
|
||||
|
|
@ -2315,7 +2315,7 @@ flags_out:
|
|||
if (stcb) {
|
||||
SCTP_TCB_UNLOCK(stcb);
|
||||
}
|
||||
*optsize = sizeof(struct sockaddr_storage) + actual;
|
||||
*optsize = sizeof(sctp_assoc_t) + actual;
|
||||
break;
|
||||
}
|
||||
case SCTP_PEER_ADDR_PARAMS:
|
||||
|
|
|
|||
Loading…
Reference in a new issue