Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jan 2016 14:01:21 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r294911 - stable/10/lib/libc/net
Message-ID:  <201601271401.u0RE1Lw5066477@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Wed Jan 27 14:01:21 2016
New Revision: 294911
URL: https://svnweb.freebsd.org/changeset/base/294911

Log:
  MFC r294694:
  sctp_sendx() needs to provide the assoc_id back.

Modified:
  stable/10/lib/libc/net/sctp_sys_calls.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/net/sctp_sys_calls.c
==============================================================================
--- stable/10/lib/libc/net/sctp_sys_calls.c	Wed Jan 27 13:59:27 2016	(r294910)
+++ stable/10/lib/libc/net/sctp_sys_calls.c	Wed Jan 27 14:01:21 2016	(r294911)
@@ -700,14 +700,19 @@ sctp_sendx(int sd, const void *msg, size
 #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
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601271401.u0RE1Lw5066477>