summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_pcb.c
diff options
context:
space:
mode:
authorrrs <rrs@FreeBSD.org>2007-04-14 09:44:09 +0000
committerrrs <rrs@FreeBSD.org>2007-04-14 09:44:09 +0000
commitfb6f6fd9a183da8573afa302e42cdf7684785a7d (patch)
tree083a217af386adf4fcec65b47183061eed4b0685 /sys/netinet/sctp_pcb.c
parent571c5243e40d0546bb093ffb58ebf6e6476cfaba (diff)
downloadFreeBSD-src-fb6f6fd9a183da8573afa302e42cdf7684785a7d.zip
FreeBSD-src-fb6f6fd9a183da8573afa302e42cdf7684785a7d.tar.gz
- fix source address selection when picking an acceptable address
- name change of prefered -> preferred - CMT fast recover code added. - Comment fixes in CMT. - We were not giving a reason of cant_start_asoc per socket api if we failed to get init/or/cookie to bring up an assoc. Change so we don't just give a generic "comm lost" but look at actual states of dying assoc. - change "crc32" arguments to "crc32c" to silence strict/noisy compiler warnings when crc32() is also declared - A few minor tweaks to get the portable stuff truely portable for sctp6_usrreq.c :-D - one-2-one style vrf match problem. - window recovery would leave chks marked for retran during window probes on the sent queue. This would then cause an out-of-order problem and assure that the flight size "problem" would occur. - Solves a flight size logging issue that caused rwnd overruns, flight size off as well as false retransmissions.g - Macroize the up and down of flight size. - Fix a ECNE bug in its counting. - The strict_sacks options was causing aborts when window probing was active, fix to make strict sacks a bit smarter about what the next unsent TSN is. - Fixes a one-2-one wakeup bug found by Martin Kulas. - If-defed out form, Andre's copy routines pending his commit of at least m_last().. need to adjust for 6.2 as well.. since m_last won't exist. Reviewed by: gnn
Diffstat (limited to 'sys/netinet/sctp_pcb.c')
-rw-r--r--sys/netinet/sctp_pcb.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c
index 19dde5d..da7d864 100644
--- a/sys/netinet/sctp_pcb.c
+++ b/sys/netinet/sctp_pcb.c
@@ -476,7 +476,7 @@ sctp_tcb_special_locate(struct sctp_inpcb **inp_p, struct sockaddr *from,
SCTP_INP_RUNLOCK(inp);
continue;
}
- if (inp->def_vrf_id == vrf_id) {
+ if (inp->def_vrf_id != vrf_id) {
SCTP_INP_RUNLOCK(inp);
continue;
}
@@ -1143,7 +1143,7 @@ struct sctp_tcb *
sctp_findassociation_addr_sa(struct sockaddr *to, struct sockaddr *from,
struct sctp_inpcb **inp_p, struct sctp_nets **netp, int find_tcp_pool, uint32_t vrf_id)
{
- struct sctp_inpcb *inp;
+ struct sctp_inpcb *inp = NULL;
struct sctp_tcb *retval;
SCTP_INP_INFO_RLOCK();
@@ -1954,7 +1954,7 @@ sctp_isport_inuse(struct sctp_inpcb *inp, uint16_t lport, uint32_t vrf_id)
} else {
/* t_inp is bound only V4 */
if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) &&
- SCTP_IPV6_V6ONLY(t_inp)) {
+ SCTP_IPV6_V6ONLY(inp)) {
/* no conflict */
continue;
}
@@ -3549,17 +3549,33 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int from_inpcbfre
}
/* now clean up any other timers */
SCTP_OS_TIMER_STOP(&asoc->hb_timer.timer);
+ asoc->hb_timer.self = NULL;
SCTP_OS_TIMER_STOP(&asoc->dack_timer.timer);
+ asoc->dack_timer.self = NULL;
SCTP_OS_TIMER_STOP(&asoc->strreset_timer.timer);
+ /*-
+ * For stream reset we don't blast this unless
+ * it is a str-reset timer, it might be the
+ * free-asoc timer which we DON'T want to
+ * disturb.
+ */
+ if (asoc->strreset_timer.type == SCTP_TIMER_TYPE_STRRESET)
+ asoc->strreset_timer.self = NULL;
SCTP_OS_TIMER_STOP(&asoc->asconf_timer.timer);
+ asoc->asconf_timer.self = NULL;
SCTP_OS_TIMER_STOP(&asoc->autoclose_timer.timer);
+ asoc->autoclose_timer.self = NULL;
SCTP_OS_TIMER_STOP(&asoc->shut_guard_timer.timer);
+ asoc->shut_guard_timer.self = NULL;
SCTP_OS_TIMER_STOP(&asoc->delayed_event_timer.timer);
-
+ asoc->delayed_event_timer.self = NULL;
TAILQ_FOREACH(net, &asoc->nets, sctp_next) {
SCTP_OS_TIMER_STOP(&net->fr_timer.timer);
+ net->fr_timer.self = NULL;
SCTP_OS_TIMER_STOP(&net->rxt_timer.timer);
+ net->rxt_timer.self = NULL;
SCTP_OS_TIMER_STOP(&net->pmtu_timer.timer);
+ net->pmtu_timer.self = NULL;
}
/* Now the read queue needs to be cleaned up (only once) */
cnt = 0;
OpenPOWER on IntegriCloud