From b71f5853033d9ac08c7e3f89de5c42b0e945e4b9 Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Tue, 9 Jul 2013 19:12:47 +0000 Subject: [PATCH] Fix the handling of SCTP_CURRENT_ASSOC and SCTP_ALL_ASSOC in sctp_opt_info(). MFC after: 3 days --- lib/libc/net/sctp_sys_calls.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/libc/net/sctp_sys_calls.c b/lib/libc/net/sctp_sys_calls.c index 3a4571f20856..1b65b07325f0 100644 --- a/lib/libc/net/sctp_sys_calls.c +++ b/lib/libc/net/sctp_sys_calls.c @@ -274,6 +274,11 @@ sctp_opt_info(int sd, sctp_assoc_t id, int opt, void *arg, socklen_t * size) 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;