Deleted Added
full compact
sctp_timer.c (179783) sctp_timer.c (180387)
1/*-
2 * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 *
7 * a) Redistributions of source code must retain the above copyright notice,
8 * this list of conditions and the following disclaimer.

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

26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28 * THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31/* $KAME: sctp_timer.c,v 1.29 2005/03/06 16:04:18 itojun Exp $ */
32
33#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 *
7 * a) Redistributions of source code must retain the above copyright notice,
8 * this list of conditions and the following disclaimer.

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

26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28 * THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31/* $KAME: sctp_timer.c,v 1.29 2005/03/06 16:04:18 itojun Exp $ */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_timer.c 179783 2008-06-14 07:58:05Z rrs $");
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_timer.c 180387 2008-07-09 16:45:30Z rrs $");
35
36#define _IP_VHL
37#include <netinet/sctp_os.h>
38#include <netinet/sctp_pcb.h>
39#ifdef INET6
35
36#define _IP_VHL
37#include <netinet/sctp_os.h>
38#include <netinet/sctp_pcb.h>
39#ifdef INET6
40#include <netinet6/sctp6_var.h>
41#endif
42#include <netinet/sctp_var.h>
43#include <netinet/sctp_sysctl.h>
44#include <netinet/sctp_timer.h>
45#include <netinet/sctputil.h>
46#include <netinet/sctp_output.h>
47#include <netinet/sctp_header.h>
48#include <netinet/sctp_indata.h>

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

397 stcb->asoc.hb_ect_randombit = 0;
398 } else {
399 this_random = stcb->asoc.hb_random_values[stcb->asoc.hb_random_idx];
400 stcb->asoc.hb_random_idx++;
401 stcb->asoc.hb_ect_randombit = 0;
402 }
403 if (this_random % 2 == 1) {
404 max_cwnd_net = mnet;
40#endif
41#include <netinet/sctp_var.h>
42#include <netinet/sctp_sysctl.h>
43#include <netinet/sctp_timer.h>
44#include <netinet/sctputil.h>
45#include <netinet/sctp_output.h>
46#include <netinet/sctp_header.h>
47#include <netinet/sctp_indata.h>

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

396 stcb->asoc.hb_ect_randombit = 0;
397 } else {
398 this_random = stcb->asoc.hb_random_values[stcb->asoc.hb_random_idx];
399 stcb->asoc.hb_random_idx++;
400 stcb->asoc.hb_ect_randombit = 0;
401 }
402 if (this_random % 2 == 1) {
403 max_cwnd_net = mnet;
405 max_cwnd = mnet->cwnd;
406 //Useless ?
404 max_cwnd = mnet->cwnd; /* Useless? */
407 }
408 }
409 }
410 /*
411 * JRS 5/14/07 - After all destination have been considered
412 * as alternates, check to see if there was some active
413 * destination (not in PF state). If not, check to see if
414 * there was some PF destination with the minimum number of

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

1706 net->ro._s_addr = NULL;
1707 net->src_addr_selected = 0;
1708 } else if (net->ro._s_addr == NULL) {
1709#if defined(INET6) && defined(SCTP_EMBEDDED_V6_SCOPE)
1710 if (net->ro._l_addr.sa.sa_family == AF_INET6) {
1711 struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&net->ro._l_addr;
1712
1713 /* KAME hack: embed scopeid */
405 }
406 }
407 }
408 /*
409 * JRS 5/14/07 - After all destination have been considered
410 * as alternates, check to see if there was some active
411 * destination (not in PF state). If not, check to see if
412 * there was some PF destination with the minimum number of

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

1704 net->ro._s_addr = NULL;
1705 net->src_addr_selected = 0;
1706 } else if (net->ro._s_addr == NULL) {
1707#if defined(INET6) && defined(SCTP_EMBEDDED_V6_SCOPE)
1708 if (net->ro._l_addr.sa.sa_family == AF_INET6) {
1709 struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&net->ro._l_addr;
1710
1711 /* KAME hack: embed scopeid */
1714 (void)sa6_embedscope(sin6, ip6_use_defzone);
1712 (void)sa6_embedscope(sin6, MODULE_GLOBAL(MOD_INET6, ip6_use_defzone));
1715 }
1716#endif
1717
1718 net->ro._s_addr = sctp_source_address_selection(inp,
1719 stcb,
1720 (sctp_route_t *) & net->ro,
1721 net, 0, stcb->asoc.vrf_id);
1722#if defined(INET6) && defined(SCTP_EMBEDDED_V6_SCOPE)

--- 235 unchanged lines hidden ---
1713 }
1714#endif
1715
1716 net->ro._s_addr = sctp_source_address_selection(inp,
1717 stcb,
1718 (sctp_route_t *) & net->ro,
1719 net, 0, stcb->asoc.vrf_id);
1720#if defined(INET6) && defined(SCTP_EMBEDDED_V6_SCOPE)

--- 235 unchanged lines hidden ---