diff options
author | tuexen <tuexen@FreeBSD.org> | 2013-07-09 19:12:47 +0000 |
---|---|---|
committer | tuexen <tuexen@FreeBSD.org> | 2013-07-09 19:12:47 +0000 |
commit | 247743cbbaf231a82a50f74ca849e50b747d1401 (patch) | |
tree | 02b1f3e97381710ce07d9b7073de586147ba9380 /lib/libc/net | |
parent | e20c3d7ebbf02da4feacb8eabcf0ea2dc2388844 (diff) | |
download | FreeBSD-src-247743cbbaf231a82a50f74ca849e50b747d1401.zip FreeBSD-src-247743cbbaf231a82a50f74ca849e50b747d1401.tar.gz |
Fix the handling of SCTP_CURRENT_ASSOC and SCTP_ALL_ASSOC in
sctp_opt_info().
MFC after: 3 days
Diffstat (limited to 'lib/libc/net')
-rw-r--r-- | lib/libc/net/sctp_sys_calls.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libc/net/sctp_sys_calls.c b/lib/libc/net/sctp_sys_calls.c index 3a4571f..1b65b07 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; |