mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
sctp: Add ASCONF operation 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. In this case, the ASCONF chunk is added to the beginning of the queue, because the other chunks cannot be transmitted in this state. Signed-off-by: Michio Honda <micchie@sfc.wide.ad.jp> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Acked-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
7dc04d7122
commit
8a07eb0a50
@@ -754,6 +754,16 @@ static int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout)
|
||||
*/
|
||||
|
||||
list_for_each_entry_safe(chunk, tmp, &q->control_chunk_list, list) {
|
||||
/* RFC 5061, 5.3
|
||||
* F1) This means that until such time as the ASCONF
|
||||
* containing the add is acknowledged, the sender MUST
|
||||
* NOT use the new IP address as a source for ANY SCTP
|
||||
* packet except on carrying an ASCONF Chunk.
|
||||
*/
|
||||
if (asoc->src_out_of_asoc_ok &&
|
||||
chunk->chunk_hdr->type != SCTP_CID_ASCONF)
|
||||
continue;
|
||||
|
||||
list_del_init(&chunk->list);
|
||||
|
||||
/* Pick the right transport to use. */
|
||||
@@ -881,6 +891,9 @@ static int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout)
|
||||
}
|
||||
}
|
||||
|
||||
if (q->asoc->src_out_of_asoc_ok)
|
||||
goto sctp_flush_out;
|
||||
|
||||
/* Is it OK to send data chunks? */
|
||||
switch (asoc->state) {
|
||||
case SCTP_STATE_COOKIE_ECHOED:
|
||||
|
||||
Reference in New Issue
Block a user