svn commit: r253105 - head/lib/libc/net

Michael Tuexen tuexen at FreeBSD.org
Tue Jul 9 19:12:47 UTC 2013


Author: tuexen
Date: Tue Jul  9 19:12:47 2013
New Revision: 253105
URL: http://svnweb.freebsd.org/changeset/base/253105

Log:
  Fix the handling of SCTP_CURRENT_ASSOC and SCTP_ALL_ASSOC in
  sctp_opt_info().
  
  MFC after: 3 days

Modified:
  head/lib/libc/net/sctp_sys_calls.c

Modified: head/lib/libc/net/sctp_sys_calls.c
==============================================================================
--- head/lib/libc/net/sctp_sys_calls.c	Tue Jul  9 19:04:19 2013	(r253104)
+++ head/lib/libc/net/sctp_sys_calls.c	Tue Jul  9 19:12:47 2013	(r253105)
@@ -274,6 +274,11 @@ sctp_opt_info(int sd, sctp_assoc_t id, i
 		errno = EINVAL;
 		return (-1);
 	}
+	if ((id == SCTP_CURRENT_ASSOC) ||
+	    (id == SCTP_ALL_ASSOC)) {
+		errno = EINVAL;
+		return (-1);
+	}
 	switch (opt) {
 	case SCTP_RTOINFO:
 		((struct sctp_rtoinfo *)arg)->srto_assoc_id = id;


More information about the svn-src-head mailing list