mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 22:51:42 +00:00
sctp: allow setting SCTP_SACK_IMMEDIATELY by the application
This patch extends commitb93d647174
("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:b93d647174
("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>
This commit is contained in:
parent
facc432faa
commit
27f7ed2b11
@ -6636,6 +6636,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;
|
||||
@ -6659,6 +6660,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;
|
||||
|
Loading…
Reference in New Issue
Block a user