Deleted Added
full compact
sctp_timer.c (235414) sctp_timer.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_timer.c,v 1.29 2005/03/06 16:04:18 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_timer.c,v 1.29 2005/03/06 16:04:18 itojun Exp $ */
34
35#include <sys/cdefs.h>
36__FBSDID("$FreeBSD: head/sys/netinet/sctp_timer.c 235414 2012-05-13 17:36:04Z tuexen $");
36__FBSDID("$FreeBSD: head/sys/netinet/sctp_timer.c 235416 2012-05-13 19:32:49Z tuexen $");
37
38#define _IP_VHL
39#include <netinet/sctp_os.h>
40#include <netinet/sctp_pcb.h>
41#ifdef INET6
42#endif
43#include <netinet/sctp_var.h>
44#include <netinet/sctp_sysctl.h>

--- 564 unchanged lines hidden (view full) ---

609 }
610 if (stcb->asoc.peer_supports_prsctp && PR_SCTP_TTL_ENABLED(chk->flags)) {
611 /* Is it expired? */
612 if (timevalcmp(&now, &chk->rec.data.timetodrop, >)) {
613 /* Yes so drop it */
614 if (chk->data) {
615 (void)sctp_release_pr_sctp_chunk(stcb,
616 chk,
37
38#define _IP_VHL
39#include <netinet/sctp_os.h>
40#include <netinet/sctp_pcb.h>
41#ifdef INET6
42#endif
43#include <netinet/sctp_var.h>
44#include <netinet/sctp_sysctl.h>

--- 564 unchanged lines hidden (view full) ---

609 }
610 if (stcb->asoc.peer_supports_prsctp && PR_SCTP_TTL_ENABLED(chk->flags)) {
611 /* Is it expired? */
612 if (timevalcmp(&now, &chk->rec.data.timetodrop, >)) {
613 /* Yes so drop it */
614 if (chk->data) {
615 (void)sctp_release_pr_sctp_chunk(stcb,
616 chk,
617 (SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT),
617 1,
618 SCTP_SO_NOT_LOCKED);
619 cnt_abandoned++;
620 }
621 continue;
622 }
623 }
624 if (stcb->asoc.peer_supports_prsctp && PR_SCTP_RTX_ENABLED(chk->flags)) {
625 /* Has it been retransmitted tv_sec times? */
626 if (chk->snd_count > chk->rec.data.timetodrop.tv_sec) {
627 if (chk->data) {
628 (void)sctp_release_pr_sctp_chunk(stcb,
629 chk,
618 SCTP_SO_NOT_LOCKED);
619 cnt_abandoned++;
620 }
621 continue;
622 }
623 }
624 if (stcb->asoc.peer_supports_prsctp && PR_SCTP_RTX_ENABLED(chk->flags)) {
625 /* Has it been retransmitted tv_sec times? */
626 if (chk->snd_count > chk->rec.data.timetodrop.tv_sec) {
627 if (chk->data) {
628 (void)sctp_release_pr_sctp_chunk(stcb,
629 chk,
630 (SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT),
630 1,
631 SCTP_SO_NOT_LOCKED);
632 cnt_abandoned++;
633 }
634 continue;
635 }
636 }
637 if (chk->sent < SCTP_DATAGRAM_RESEND) {
638 sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt);

--- 958 unchanged lines hidden ---
631 SCTP_SO_NOT_LOCKED);
632 cnt_abandoned++;
633 }
634 continue;
635 }
636 }
637 if (chk->sent < SCTP_DATAGRAM_RESEND) {
638 sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt);

--- 958 unchanged lines hidden ---