1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-05 09:14:03 +00:00

sctp_sendx() needs to provide the assoc_id back.

MFC after: 3 days
This commit is contained in:
Michael Tuexen 2016-01-24 22:31:34 +00:00
parent 52d5897d50
commit 32d0a77de1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=294694

View File

@ -700,14 +700,19 @@ sctp_sendx(int sd, const void *msg, size_t msg_len,
#ifdef SYS_sctp_generic_sendmsg
if (addrcnt == 1) {
socklen_t l;
ssize_t ret;
/*
* Quick way, we don't need to do a connectx so lets use the
* syscall directly.
*/
l = addrs->sa_len;
return (syscall(SYS_sctp_generic_sendmsg, sd,
msg, msg_len, addrs, l, sinfo, flags));
ret = syscall(SYS_sctp_generic_sendmsg, sd,
msg, msg_len, addrs, l, sinfo, flags);
if ((ret >= 0) && (sinfo != NULL)) {
sinfo->sinfo_assoc_id = sctp_getassocid(sd, addrs);
}
return (ret);
}
#endif