Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Jul 2013 19:12:47 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r253105 - head/lib/libc/net
Message-ID:  <201307091912.r69JCl9r007082@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



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