diff options
author | rrs <rrs@FreeBSD.org> | 2007-07-24 20:06:02 +0000 |
---|---|---|
committer | rrs <rrs@FreeBSD.org> | 2007-07-24 20:06:02 +0000 |
commit | 1db8ba247453b3da31775f1a39199179ca75bfb7 (patch) | |
tree | d2ea0fd9ef19605e959e0ed17a4723e94186c995 /sys/netinet/sctp_timer.c | |
parent | 4177278d87cbfa0b06b72d4b526e3a39dbd7838b (diff) | |
download | FreeBSD-src-1db8ba247453b3da31775f1a39199179ca75bfb7.zip FreeBSD-src-1db8ba247453b3da31775f1a39199179ca75bfb7.tar.gz |
- take out a needless panic under invariants for sctp_output.c
- Fix addrs's error checking of sctp_sendx(3) when addrcnt is less than
SCTP_SMALL_IOVEC_SIZE
- re-add back inpcb_bind local address check bypass capability
- Fix it so sctp_opt_info is independant of assoc_id postion.
- Fix cookie life set to use MSEC_TO_TICKS() macro.
- asconf changes
o More comment changes/clarifications related to the old local address
"not" list which is now an explicit restricted list.
o Rename some functions for clarity:
- sctp_add/del_local_addr_assoc to xxx_local_addr_restricted()
- asconf related iterator functions to sctp_asconf_iterator_xxx()
o Fix bug when the same address is deleted and added (and removed from
the asconf queue) where the ifa is "freed" twice refcount wise,
possibly freeing it completely.
o Fix bug in output where the first ASCONF would not go out after the
last address is changed (e.g. only goes out when retransmitted).
o Fix bug where multiple ASCONFs can be bundled in the same packet with
the and with the same serial numbers.
o Fix asconf stcb iterator to not send ASCONF until after all work
queue entries have been processed.
o Change behavior so that when the last address is deleted (auto asconf
on a bound all endpoint) no action is taken until an address is
added; at that time, an ASCONF add+delete is sent (if the assoc
is still up).
o Fix local address counting so that address scoping is taken into
account.
o #ifdef SCTP_TIMER_BASED_ASCONF the old timer triggered sending
of ASCONF (after an RTO). The default now is to send
ASCONF immediately (except for the case of changing/deleting the
last usable address).
Approved by: re(ken smith)@freebsd.org
Diffstat (limited to 'sys/netinet/sctp_timer.c')
-rw-r--r-- | sys/netinet/sctp_timer.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/sys/netinet/sctp_timer.c b/sys/netinet/sctp_timer.c index 4149afc..75214ed 100644 --- a/sys/netinet/sctp_timer.c +++ b/sys/netinet/sctp_timer.c @@ -1301,12 +1301,14 @@ sctp_asconf_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets *alt; struct sctp_tmit_chunk *asconf, *chk; - /* is this the first send, or a retransmission? */ + /* is this a first send, or a retransmission? */ if (stcb->asoc.asconf_sent == 0) { /* compose a new ASCONF chunk and send it */ sctp_send_asconf(stcb, net); } else { - /* Retransmission of the existing ASCONF needed... */ + /* + * Retransmission of the existing ASCONF is needed + */ /* find the existing ASCONF */ TAILQ_FOREACH(asconf, &stcb->asoc.control_send_queue, @@ -1324,25 +1326,21 @@ sctp_asconf_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb, /* Assoc is over */ return (1); } - /* - * PETER? FIX? How will the following code ever run? If the - * max_send_times is hit, threshold managment will blow away - * the association? - */ if (asconf->snd_count > stcb->asoc.max_send_times) { /* - * Something is rotten, peer is not responding to - * ASCONFs but maybe is to data etc. e.g. it is not - * properly handling the chunk type upper bits Mark - * this peer as ASCONF incapable and cleanup + * Something is rotten: our peer is not responding + * to ASCONFs but apparently is to other chunks. + * i.e. it is not properly handling the chunk type + * upper bits. Mark this peer as ASCONF incapable + * and cleanup. */ SCTPDBG(SCTP_DEBUG_TIMER1, "asconf_timer: Peer has not responded to our repeated ASCONFs\n"); sctp_asconf_cleanup(stcb, net); return (0); } /* - * cleared theshold management now lets backoff the address - * & select an alternate + * cleared threshold management, so now backoff the net and + * select an alternate */ sctp_backoff_on_timeout(stcb, asconf->whoTo, 1, 0); alt = sctp_find_alternate_net(stcb, asconf->whoTo, 0); @@ -1350,7 +1348,7 @@ sctp_asconf_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb, asconf->whoTo = alt; atomic_add_int(&alt->ref_count, 1); - /* See if a ECN Echo is also stranded */ + /* See if an ECN Echo is also stranded */ TAILQ_FOREACH(chk, &stcb->asoc.control_send_queue, sctp_next) { if ((chk->whoTo == net) && (chk->rec.chunk_id.id == SCTP_ECN_ECHO)) { @@ -1366,7 +1364,7 @@ sctp_asconf_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb, if (net->dest_state & SCTP_ADDR_NOT_REACHABLE) { /* * If the address went un-reachable, we need to move - * to alternates for ALL chk's in queue + * to the alternate for ALL chunks in queue */ sctp_move_all_chunks_to_alt(stcb, net, alt); } |