All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Yongjun <yjwei@cn.fujitsu.com>
To: linux-sctp@vger.kernel.org
Subject: Re: [PATCH] sctp: send SHUTDOWN-ACK chunk back to where the SHUTDOWN
Date: Thu, 25 Feb 2010 01:19:02 +0000	[thread overview]
Message-ID: <4B85D006.7060103@cn.fujitsu.com> (raw)
In-Reply-To: <4B4C307C.5070901@cn.fujitsu.com>

Vlad Yasevich wrote:
> I was just doing review of the patches again and testing them out.
>
> I think the following is a more elegant solution.
>
> diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
> index 4e4ca65..bbd238d 100644
> --- a/net/sctp/sm_sideeffect.c
> +++ b/net/sctp/sm_sideeffect.c
> @@ -696,11 +696,15 @@ static void sctp_cmd_setup_t2(sctp_cmd_seq_t *cmds,
>  {
>         struct sctp_transport *t;
>
> -       t = sctp_assoc_choose_alter_transport(asoc,
> +       if (chunk->transport)
> +               t = chunk->transport;
> +       else {
> +               t = sctp_assoc_choose_alter_transport(asoc,
>                                               asoc->shutdown_last_sent_to);
> +               chunk->transport = t;
> +       }
>         asoc->shutdown_last_sent_to = t;
>         asoc->timeouts[SCTP_EVENT_TIMEOUT_T2_SHUTDOWN] = t->rto;
> -       chunk->transport = t;
>  }
>
>  /* Helper function to change the state of an association. */
>   

It is OK to me, thanks.



      parent reply	other threads:[~2010-02-25  1:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-12  8:19 [PATCH] sctp: send SHUTDOWN-ACK chunk back to where the SHUTDOWN Wei Yongjun
2010-02-24 22:07 ` Vlad Yasevich
2010-02-25  1:19 ` Wei Yongjun [this message]

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=4B85D006.7060103@cn.fujitsu.com \
    --to=yjwei@cn.fujitsu.com \
    --cc=linux-sctp@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.