netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: Xin Long <lucien.xin@gmail.com>
Cc: network dev <netdev@vger.kernel.org>,
	linux-sctp@vger.kernel.org, davem@davemloft.net,
	Neil Horman <nhorman@tuxdriver.com>
Subject: Re: [PATCH net] sctp: report SCTP_ERROR_INV_STRM as cpu endian
Date: Fri, 17 Nov 2017 13:04:59 -0200	[thread overview]
Message-ID: <20171117150459.GK6388@localhost.localdomain> (raw)
In-Reply-To: <d4de9314041c0ebb1d1e5f49130b880788a30735.1510899302.git.lucien.xin@gmail.com>

On Fri, Nov 17, 2017 at 02:15:02PM +0800, Xin Long wrote:
> rfc6458 demands the send_error in SCTP_SEND_FAILED_EVENT should
> be in cpu endian, while SCTP_ERROR_INV_STRM is in big endian.
> 
> This issue is there since very beginning, Eric noticed it by
> running 'make C=2 M=net/sctp/'.
> 
> This patch is to convert it before reporting it.

Unfortunatelly we can't fix this as this will break UAPI. It will
break applications that are currently matching on the current value.

> 
> Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
> Signed-off-by: Xin Long <lucien.xin@gmail.com>
> ---
>  net/sctp/stream.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/sctp/stream.c b/net/sctp/stream.c
> index a11db21..f86ceee 100644
> --- a/net/sctp/stream.c
> +++ b/net/sctp/stream.c
> @@ -64,7 +64,7 @@ static void sctp_stream_outq_migrate(struct sctp_stream *stream,
>  		 */
>  
>  		/* Mark as failed send. */
> -		sctp_chunk_fail(ch, SCTP_ERROR_INV_STRM);
> +		sctp_chunk_fail(ch, be16_to_cpu(SCTP_ERROR_INV_STRM));
>  		if (asoc->peer.prsctp_capable &&
>  		    SCTP_PR_PRIO_ENABLED(ch->sinfo.sinfo_flags))
>  			asoc->sent_cnt_removable--;
> -- 
> 2.1.0
> 

  reply	other threads:[~2017-11-17 15:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-17  6:15 [PATCH net] sctp: report SCTP_ERROR_INV_STRM as cpu endian Xin Long
2017-11-17 15:04 ` Marcelo Ricardo Leitner [this message]
2017-11-18 18:20   ` Xin Long
2017-11-20 12:29     ` Marcelo Ricardo Leitner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171117150459.GK6388@localhost.localdomain \
    --to=marcelo.leitner@gmail.com \
    --cc=davem@davemloft.net \
    --cc=linux-sctp@vger.kernel.org \
    --cc=lucien.xin@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).