public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Wei Yongjun <yjwei@cn•fujitsu.com>
To: Michio Honda <micchie@sfc•wide.ad.jp>
Cc: netdev@vger•kernel.org, lksctp-developers@lists•sourceforge.net
Subject: Re: [PATCH net-next-2.6 v3 2/3] sctp: Add ASCONF operation on the single-homed host
Date: Wed, 13 Apr 2011 09:14:33 +0800	[thread overview]
Message-ID: <4DA4F8F9.2030302@cn.fujitsu.com> (raw)
In-Reply-To: <02627A77-8793-4EEC-9540-F2DECBB8E23A@sfc.wide.ad.jp>


Hi, Michio Honda

> SCTP can change the IP address on the single-homed host.  
> In this case, the SCTP association transmits an ASCONF packet including addition of the new IP address and deletion of the old address.  
> This patch implements this functionality.  
>
>

...snip...

>  
> @@ -1277,7 +1284,7 @@ void sctp_assoc_update(struct sctp_association *asoc,
>   */
>  void sctp_assoc_update_retran_path(struct sctp_association *asoc)
>  {
> -	struct sctp_transport *t, *next;
> +	struct sctp_transport *t, *next, *unconfirmed;
>  	struct list_head *head = &asoc->peer.transport_addr_list;
>  	struct list_head *pos;
>  
> @@ -1287,7 +1294,7 @@ void sctp_assoc_update_retran_path(struct sctp_association *asoc)
>  	/* Find the next transport in a round-robin fashion. */
>  	t = asoc->peer.retran_path;
>  	pos = &t->transports;
> -	next = NULL;
> +	next = unconfirmed = NULL;
>  
>  	while (1) {
>  		/* Skip the head. */
> @@ -1318,11 +1325,15 @@ void sctp_assoc_update_retran_path(struct sctp_association *asoc)
>  			 */
>  			if (t->state != SCTP_UNCONFIRMED && !next)
>  				next = t;
> +			else if (t->state == SCTP_UNCONFIRMED)
> +				unconfirmed = t;
>  		}
>  	}
>  
>  	if (t)
>  		asoc->peer.retran_path = t;
> +	else if (unconfirmed)
> +		asoc->peer.retran_path = t = unconfirmed;
>  
>  	SCTP_DEBUG_PRINTK_IPADDR("sctp_assoc_update_retran_path:association"
>  				 " %p addr: "

since we can not select unconfirmed transports for retransmission,
this part is not correct. the specification forbids this due to security
issues.
Not sure whether you hit this bug: remove transport and left only
one unconfirmed transport, it may cause oops while retransmit.
I will send other patch to fix it first.


...snip...


  parent reply	other threads:[~2011-04-13  1:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-08  5:19 [PATCH net-next-2.6 v3 2/3] sctp: Add ASCONF operation on the single-homed host Michio Honda
2011-04-11  5:41 ` Wei Yongjun
2011-04-13  1:14 ` Wei Yongjun [this message]
2011-04-13  1:32   ` Michio Honda

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=4DA4F8F9.2030302@cn.fujitsu.com \
    --to=yjwei@cn$(echo .)fujitsu.com \
    --cc=lksctp-developers@lists$(echo .)sourceforge.net \
    --cc=micchie@sfc$(echo .)wide.ad.jp \
    --cc=netdev@vger$(echo .)kernel.org \
    /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