From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neil Horman Subject: Re: [PATCH net] sctp: use the old asoc when making the cookie-ack chunk in dupcook_d Date: Wed, 2 May 2018 07:46:35 -0400 Message-ID: <20180502114635.GC13202@hmswarspite.think-freely.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: network dev , linux-sctp@vger.kernel.org, davem@davemloft.net, Marcelo Ricardo Leitner To: Xin Long Return-path: Received: from charlotte.tuxdriver.com ([70.61.120.58]:55589 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750897AbeEBLrZ (ORCPT ); Wed, 2 May 2018 07:47:25 -0400 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Wed, May 02, 2018 at 01:39:46PM +0800, Xin Long wrote: > When processing a duplicate cookie-echo chunk, for case 'D', sctp will > not process the param from this chunk. It means old asoc has nothing > to be updated, and the new temp asoc doesn't have the complete info. > > So there's no reason to use the new asoc when creating the cookie-ack > chunk. Otherwise, like when auth is enabled for cookie-ack, the chunk > can not be set with auth, and it will definitely be dropped by peer. > > This issue is there since very beginning, and we fix it by using the > old asoc instead. > > Signed-off-by: Xin Long > --- > net/sctp/sm_statefuns.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c > index 98acfed..28c070e 100644 > --- a/net/sctp/sm_statefuns.c > +++ b/net/sctp/sm_statefuns.c > @@ -2056,7 +2056,7 @@ static enum sctp_disposition sctp_sf_do_dupcook_d( > } > } > > - repl = sctp_make_cookie_ack(new_asoc, chunk); > + repl = sctp_make_cookie_ack(asoc, chunk); > if (!repl) > goto nomem; > > -- > 2.1.0 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-sctp" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Acked-by: Neil Horman