[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGCdqXE1VvyuoyhgJnRtksoRBPHwD0jSbvUHAo3pSErWuGGhBQ@mail.gmail.com>
Date: Sun, 24 Jan 2016 22:24:10 -0500
From: Vladislav Yasevich <vyasevich@...il.com>
To: Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-sctp@...r.kernel.org" <linux-sctp@...r.kernel.org>,
Neil Horman <nhorman@...driver.com>
Subject: Re: [PATCH net] sctp: allow setting SCTP_SACK_IMMEDIATELY by the application
On Fri, Jan 22, 2016 at 3:29 PM, Marcelo Ricardo Leitner
<marcelo.leitner@...il.com> wrote:
> 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@...il.com>
Acked-by: Vlad Yasevich <vyasevich@...il.com>
-vlad
> ---
> net/sctp/socket.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/net/sctp/socket.c b/net/sctp/socket.c
> index 2657b51f627625a4d674041da1f6dd913932b1d7..594ba9db9c2660b6b0803a2a3955ea7e8b3a7a44 100644
> --- a/net/sctp/socket.c
> +++ b/net/sctp/socket.c
> @@ -6638,6 +6638,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;
> @@ -6661,6 +6662,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;
> --
> 2.5.0
>
Powered by blists - more mailing lists