From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Ricardo Leitner Subject: Re: [PATCH net] sctp: report SCTP_ERROR_INV_STRM as cpu endian Date: Fri, 17 Nov 2017 13:04:59 -0200 Message-ID: <20171117150459.GK6388@localhost.localdomain> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: network dev , linux-sctp@vger.kernel.org, davem@davemloft.net, Neil Horman To: Xin Long Return-path: Received: from mail-qt0-f196.google.com ([209.85.216.196]:42880 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758018AbdKQPFF (ORCPT ); Fri, 17 Nov 2017 10:05:05 -0500 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: 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 > Signed-off-by: Xin Long > --- > 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 >