From dfb6039bc1916c3c54f9056eccab33f9b48cb2dd Mon Sep 17 00:00:00 2001 From: rrs Date: Mon, 1 Oct 2007 03:22:29 +0000 Subject: - Bug fix managing congestion parameter on immediate retransmittion by handover event (fast mobility code) - Fixed problem of mobility code which is caused by remaining parameters in the deleted primary destination. - Add a missing lock. When a peer sends an INIT, and while we are processing it to send an INIT-ACK the socket is closed, we did not hold a lock to keep the socket from going away. Add protection for this case. - Fix so that arwnd is alway uses the minimal rwnd if the user has set the socket buffer smaller. Found this when the test org decided to see what happens when you set in a rwnd of 10 bytes (which is not allowed per RFC .. 4k is minimum). - Fixes so a cookie-echo ootb will NOT cause an abort to be sent. This was happening in a MPI collision case. - Examined all panics and unless there was no recovery, moved any that were not already to INVARANTS. Approved by: re@freebsd.org (gnn) --- sys/netinet/sctp_indata.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sys/netinet/sctp_indata.c') diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c index 842aca6..e001a0c 100644 --- a/sys/netinet/sctp_indata.c +++ b/sys/netinet/sctp_indata.c @@ -1571,8 +1571,8 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc, asoc->highest_tsn_inside_map, MAX_TSN)) { /* Nope not in the valid range dump it */ - SCTPDBG(SCTP_DEBUG_INDATA1, "My rwnd overrun1:tsn:%lx rwnd %lu sbspace:%ld\n", - (u_long)tsn, (u_long)asoc->my_rwnd, + SCTPDBG(SCTP_DEBUG_INDATA1, "My rwnd overrun1:tsn:%x rwnd %x sbspace:%x\n", + tsn, asoc->my_rwnd, sctp_sbspace(&stcb->asoc, &stcb->sctp_socket->so_rcv)); sctp_set_rwnd(stcb, asoc); if ((asoc->cnt_on_all_streams + @@ -2325,7 +2325,12 @@ sctp_sack_check(struct sctp_tcb *stcb, int ok_to_sack, int was_a_gap, int *abort } slide_end = lgap >> 3; if (slide_end < slide_from) { +#ifdef INVARIANTS panic("impossible slide"); +#else + printf("impossible slide?\n"); + return; +#endif } distance = (slide_end - slide_from) + 1; if (sctp_logging_level & SCTP_MAP_LOGGING_ENABLE) { -- cgit v1.1