diff options
author | rrs <rrs@FreeBSD.org> | 2008-08-28 09:44:07 +0000 |
---|---|---|
committer | rrs <rrs@FreeBSD.org> | 2008-08-28 09:44:07 +0000 |
commit | a97a9f5233562046294f64d3db07ca1c90e63a35 (patch) | |
tree | 4a6ba48264c10107c71cdb81d7b311404516ea68 /sys/netinet/sctputil.c | |
parent | 8ccd4bd3a18f0d73c17c7096b561febf5d6f93d8 (diff) | |
download | FreeBSD-src-a97a9f5233562046294f64d3db07ca1c90e63a35.zip FreeBSD-src-a97a9f5233562046294f64d3db07ca1c90e63a35.tar.gz |
- Make strict-sacks be the default.
- Change it so that without INVARIANTs there are
no panics in SCTP.
- sctp_timer changes so that we have a recovery mechanism
when the sent list is out of order.
Diffstat (limited to 'sys/netinet/sctputil.c')
-rw-r--r-- | sys/netinet/sctputil.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index dc215bd..20865c4 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -922,7 +922,9 @@ sctp_init_asoc(struct sctp_inpcb *m, struct sctp_tcb *stcb, asoc->my_vtag = override_tag; } else { SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ENOMEM); +#ifdef INVARIANTS panic("Huh is_in_timewait fails"); +#endif return (ENOMEM); } @@ -4848,6 +4850,7 @@ sctp_find_ifa_by_addr(struct sockaddr *addr, uint32_t vrf_id, int holds_lock) vrf = sctp_find_vrf(vrf_id); if (vrf == NULL) { +stage_right: if (holds_lock == 0) SCTP_IPI_ADDR_RUNLOCK(); return (NULL); @@ -4868,7 +4871,13 @@ sctp_find_ifa_by_addr(struct sockaddr *addr, uint32_t vrf_id, int holds_lock) } LIST_FOREACH(sctp_ifap, hash_head, next_bucket) { if (sctp_ifap == NULL) { +#ifdef INVARIANTS panic("Huh LIST_FOREACH corrupt"); + goto stage_right; +#else + SCTP_PRINTF("LIST corrupt of sctp_ifap's?\n"); + goto stage_right; +#endif } if (addr->sa_family != sctp_ifap->address.sa.sa_family) continue; @@ -5918,7 +5927,12 @@ out: * the atomic add to the refcnt. */ if (stcb == NULL) { +#ifdef INVARIANTS panic("stcb for refcnt has gone NULL?"); + goto stage_left; +#else + goto stage_left; +#endif } atomic_add_int(&stcb->asoc.refcnt, -1); freecnt_applied = 0; @@ -5940,6 +5954,7 @@ out: so->so_rcv.sb_cc); } } +stage_left: if (wakeup_read_socket) { sctp_sorwakeup(inp, so); } |