diff options
author | Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> | 2016-01-22 23:29:49 +0300 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2016-02-27 17:28:43 +0300 |
commit | b3efe4725b6d87ef5f1a3e4ba08bbfa20d069e2c (patch) | |
tree | a8ac05671b1971db3ac14cd6c97eeb28e7ed6ae5 | |
parent | b37593c406b332aec4154e0e5e9572c24c6bcd7e (diff) | |
download | linux-b3efe4725b6d87ef5f1a3e4ba08bbfa20d069e2c.tar.xz |
sctp: allow setting SCTP_SACK_IMMEDIATELY by the application
commit 27f7ed2b11d42ab6d796e96533c2076ec220affc upstream.
This patch extends commit b93d6471748d ("sctp: implement the sender side
for SACK-IMMEDIATELY extension") as it didn't white list
SCTP_SACK_IMMEDIATELY on sctp_msghdr_parse(), causing it to be
understood as an invalid flag and returning -EINVAL to the application.
Note that the actual handling of the flag is already there in
sctp_datamsg_from_user().
https://tools.ietf.org/html/rfc7053#section-7
Fixes: b93d6471748d ("sctp: implement the sender side for SACK-IMMEDIATELY extension")
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.2: drop the second hunk as we don't have SCTP_SNDINFO
cmsg support]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r-- | net/sctp/socket.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 396283b306ab..bb8c3b4e7feb 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -6241,6 +6241,7 @@ SCTP_STATIC int sctp_msghdr_parse(const struct msghdr *msg, /* Minimally, validate the sinfo_flags. */ if (cmsgs->info->sinfo_flags & ~(SCTP_UNORDERED | SCTP_ADDR_OVER | + SCTP_SACK_IMMEDIATELY | SCTP_ABORT | SCTP_EOF)) return -EINVAL; break; |