svn commit: r253269 - stable/9/lib/libc/net

Michael Tuexen tuexen at FreeBSD.org
Fri Jul 12 14:58:10 UTC 2013


Author: tuexen
Date: Fri Jul 12 14:58:09 2013
New Revision: 253269
URL: http://svnweb.freebsd.org/changeset/base/253269

Log:
  MFC r253104:
  Fix a bug where SCTP_ENABLE_STREAM_RESET is not handled by
  sctp_opt_info().
  
  MFC r253105:
  Fix the handling of SCTP_CURRENT_ASSOC and SCTP_ALL_ASSOC in
  sctp_opt_info().
  
  Approved by: re@

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

Modified: stable/9/lib/libc/net/sctp_sys_calls.c
==============================================================================
--- stable/9/lib/libc/net/sctp_sys_calls.c	Fri Jul 12 14:46:40 2013	(r253268)
+++ stable/9/lib/libc/net/sctp_sys_calls.c	Fri Jul 12 14:58:09 2013	(r253269)
@@ -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;
@@ -338,6 +343,9 @@ sctp_opt_info(int sd, sctp_assoc_t id, i
 	case SCTP_MAX_BURST:
 		((struct sctp_assoc_value *)arg)->assoc_id = id;
 		break;
+	case SCTP_ENABLE_STREAM_RESET:
+		((struct sctp_assoc_value *)arg)->assoc_id = id;
+		break;
 	default:
 		break;
 	}


More information about the svn-src-stable-9 mailing list