From: Vlad Yasevich <vyasevich@gmail•com>
To: Chang Xiangzhong <changxiangzhong@gmail•com>
Cc: nhorman@tuxdriver•com, davem@davemloft•net,
linux-sctp@vger•kernel.org, netdev@vger•kernel.org
Subject: Re: [PATCH] net: sctp: bug-fixing: retran_path not set properly after transports recovering (v3)
Date: Wed, 13 Nov 2013 20:42:20 -0500 [thread overview]
Message-ID: <52842A7C.7060908@gmail.com> (raw)
In-Reply-To: <1384387106-8105-1-git-send-email-changxiangzhong@gmail.com>
On 11/13/2013 06:58 PM, Chang Xiangzhong wrote:
> When a transport recovers due to the new coming sack, SCTP should
> iterate all of its transport_list to locate the __two__ most recently used
> transport and set to active_path and retran_path respectively. The exising
> code does not find the two properly - In case of the following list:
>
> [most-recent] -> [2nd-most-recent] -> ...
>
> Both active_path and retran_path would be set to the 1st element.
>
> The bug happens when:
> 1) multi-homing
> 2) failure/partial_failure transport recovers
> Both active_path and retran_path would be set to the same most-recent one, in
> other words, retran_path would not take its role - an end user might not even
> notice this issue.
>
> Signed-off-by: Chang Xiangzhong <changxiangzhong@gmail•com>
Acked-by: Vlad Yasevich <vyasevich@gmail•com>
-vlad
> ---
> net/sctp/associola.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/net/sctp/associola.c b/net/sctp/associola.c
> index ab67efc..8f26276 100644
> --- a/net/sctp/associola.c
> +++ b/net/sctp/associola.c
> @@ -913,8 +913,8 @@ void sctp_assoc_control_transport(struct sctp_association *asoc,
> if (!first || t->last_time_heard > first->last_time_heard) {
> second = first;
> first = t;
> - }
> - if (!second || t->last_time_heard > second->last_time_heard)
> + } else if (!second ||
> + t->last_time_heard > second->last_time_heard)
> second = t;
> }
>
> @@ -935,6 +935,8 @@ void sctp_assoc_control_transport(struct sctp_association *asoc,
> first = asoc->peer.primary_path;
> }
>
> + if (!second)
> + second = first;
> /* If we failed to find a usable transport, just camp on the
> * primary, even if it is inactive.
> */
>
next prev parent reply other threads:[~2013-11-14 1:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-13 23:58 [PATCH] net: sctp: bug-fixing: retran_path not set properly after transports recovering (v3) Chang Xiangzhong
2013-11-14 1:42 ` Vlad Yasevich [this message]
2013-11-14 8:12 ` Chang
2013-11-14 8:20 ` David Miller
2013-11-14 8:20 ` Chang
2013-11-14 13:55 ` Neil Horman
2013-11-14 21:36 ` David Miller
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=52842A7C.7060908@gmail.com \
--to=vyasevich@gmail$(echo .)com \
--cc=changxiangzhong@gmail$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=linux-sctp@vger$(echo .)kernel.org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=nhorman@tuxdriver$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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