diff options
author | Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> | 2016-01-22 18:29:49 -0200 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2016-03-04 10:25:47 -0500 |
commit | 6e13e7b0183e0b9945ff350bd5fad573c2ece83c (patch) | |
tree | e4c1e0d6688924af1d16e1f9ea77ba3f3238524a | |
parent | ce28c3ced53aa6385eafeabaeb9c70eca9e3b1ba (diff) |
sctp: allow setting SCTP_SACK_IMMEDIATELY by the application
[ Upstream commit 27f7ed2b11d42ab6d796e96533c2076ec220affc ]
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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
-rw-r--r-- | net/sctp/socket.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 76e6ec62cf92..1b80f209c5ec 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -6653,6 +6653,7 @@ static int sctp_msghdr_parse(const struct msghdr *msg, sctp_cmsgs_t *cmsgs) if (cmsgs->srinfo->sinfo_flags & ~(SCTP_UNORDERED | SCTP_ADDR_OVER | + SCTP_SACK_IMMEDIATELY | SCTP_ABORT | SCTP_EOF)) return -EINVAL; break; @@ -6676,6 +6677,7 @@ static int sctp_msghdr_parse(const struct msghdr *msg, sctp_cmsgs_t *cmsgs) if (cmsgs->sinfo->snd_flags & ~(SCTP_UNORDERED | SCTP_ADDR_OVER | + SCTP_SACK_IMMEDIATELY | SCTP_ABORT | SCTP_EOF)) return -EINVAL; break; |