sctp_indata.c (235414) | sctp_indata.c (235416) |
---|---|
1/*- 2 * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. 3 * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. 4 * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are met: 8 * --- 19 unchanged lines hidden (view full) --- 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33/* $KAME: sctp_indata.c,v 1.36 2005/03/06 16:04:17 itojun Exp $ */ 34 35#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. 3 * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. 4 * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are met: 8 * --- 19 unchanged lines hidden (view full) --- 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33/* $KAME: sctp_indata.c,v 1.36 2005/03/06 16:04:17 itojun Exp $ */ 34 35#include <sys/cdefs.h> |
36__FBSDID("$FreeBSD: head/sys/netinet/sctp_indata.c 235414 2012-05-13 17:36:04Z tuexen $"); | 36__FBSDID("$FreeBSD: head/sys/netinet/sctp_indata.c 235416 2012-05-13 19:32:49Z tuexen $"); |
37 38#include <netinet/sctp_os.h> 39#include <netinet/sctp_var.h> 40#include <netinet/sctp_sysctl.h> 41#include <netinet/sctp_pcb.h> 42#include <netinet/sctp_header.h> 43#include <netinet/sctputil.h> 44#include <netinet/sctp_output.h> --- 3144 unchanged lines hidden (view full) --- 3189 break; 3190 } 3191 if (stcb->asoc.peer_supports_prsctp) { 3192 if ((PR_SCTP_TTL_ENABLED(tp1->flags)) && tp1->sent < SCTP_DATAGRAM_ACKED) { 3193 /* Is it expired? */ 3194 if (timevalcmp(&now, &tp1->rec.data.timetodrop, >)) { 3195 /* Yes so drop it */ 3196 if (tp1->data != NULL) { | 37 38#include <netinet/sctp_os.h> 39#include <netinet/sctp_var.h> 40#include <netinet/sctp_sysctl.h> 41#include <netinet/sctp_pcb.h> 42#include <netinet/sctp_header.h> 43#include <netinet/sctputil.h> 44#include <netinet/sctp_output.h> --- 3144 unchanged lines hidden (view full) --- 3189 break; 3190 } 3191 if (stcb->asoc.peer_supports_prsctp) { 3192 if ((PR_SCTP_TTL_ENABLED(tp1->flags)) && tp1->sent < SCTP_DATAGRAM_ACKED) { 3193 /* Is it expired? */ 3194 if (timevalcmp(&now, &tp1->rec.data.timetodrop, >)) { 3195 /* Yes so drop it */ 3196 if (tp1->data != NULL) { |
3197 (void)sctp_release_pr_sctp_chunk(stcb, tp1, 3198 (SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT), | 3197 (void)sctp_release_pr_sctp_chunk(stcb, tp1, 1, |
3199 SCTP_SO_NOT_LOCKED); 3200 } 3201 continue; 3202 } 3203 } 3204 } 3205 if (SCTP_TSN_GT(tp1->rec.data.TSN_seq, asoc->this_sack_highest_gap)) { 3206 /* we are beyond the tsn in the sack */ --- 240 unchanged lines hidden (view full) --- 3447 (PR_SCTP_RTX_ENABLED(tp1->flags))) { 3448 /* 3449 * Has it been retransmitted tv_sec times? - 3450 * we store the retran count there. 3451 */ 3452 if (tp1->snd_count > tp1->rec.data.timetodrop.tv_sec) { 3453 /* Yes, so drop it */ 3454 if (tp1->data != NULL) { | 3198 SCTP_SO_NOT_LOCKED); 3199 } 3200 continue; 3201 } 3202 } 3203 } 3204 if (SCTP_TSN_GT(tp1->rec.data.TSN_seq, asoc->this_sack_highest_gap)) { 3205 /* we are beyond the tsn in the sack */ --- 240 unchanged lines hidden (view full) --- 3446 (PR_SCTP_RTX_ENABLED(tp1->flags))) { 3447 /* 3448 * Has it been retransmitted tv_sec times? - 3449 * we store the retran count there. 3450 */ 3451 if (tp1->snd_count > tp1->rec.data.timetodrop.tv_sec) { 3452 /* Yes, so drop it */ 3453 if (tp1->data != NULL) { |
3455 (void)sctp_release_pr_sctp_chunk(stcb, tp1, 3456 (SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT), | 3454 (void)sctp_release_pr_sctp_chunk(stcb, tp1, 1, |
3457 SCTP_SO_NOT_LOCKED); 3458 } 3459 /* Make sure to flag we had a FR */ 3460 tp1->whoTo->net_ack++; 3461 continue; 3462 } 3463 } 3464 /* --- 162 unchanged lines hidden (view full) --- 3627 /* 3628 * Now is this one marked for resend and its time is 3629 * now up? 3630 */ 3631 if (timevalcmp(&now, &tp1->rec.data.timetodrop, >)) { 3632 /* Yes so drop it */ 3633 if (tp1->data) { 3634 (void)sctp_release_pr_sctp_chunk(stcb, tp1, | 3455 SCTP_SO_NOT_LOCKED); 3456 } 3457 /* Make sure to flag we had a FR */ 3458 tp1->whoTo->net_ack++; 3459 continue; 3460 } 3461 } 3462 /* --- 162 unchanged lines hidden (view full) --- 3625 /* 3626 * Now is this one marked for resend and its time is 3627 * now up? 3628 */ 3629 if (timevalcmp(&now, &tp1->rec.data.timetodrop, >)) { 3630 /* Yes so drop it */ 3631 if (tp1->data) { 3632 (void)sctp_release_pr_sctp_chunk(stcb, tp1, |
3635 (SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT), 3636 SCTP_SO_NOT_LOCKED); | 3633 1, SCTP_SO_NOT_LOCKED); |
3637 } 3638 } else { 3639 /* 3640 * No, we are done when hit one for resend 3641 * whos time as not expired. 3642 */ 3643 break; 3644 } --- 1937 unchanged lines hidden --- | 3634 } 3635 } else { 3636 /* 3637 * No, we are done when hit one for resend 3638 * whos time as not expired. 3639 */ 3640 break; 3641 } --- 1937 unchanged lines hidden --- |