Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Feb 2012 00:54:24 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r231490 - in stable/8/sys: netinet netinet6
Message-ID:  <201202110054.q1B0sODo005283@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Sat Feb 11 00:54:24 2012
New Revision: 231490
URL: http://svn.freebsd.org/changeset/base/231490

Log:
  MFC r228653:
  Fix unused parameter warnings.
  While there, fix some whitespace issues.

Modified:
  stable/8/sys/netinet/sctp.h
  stable/8/sys/netinet/sctp_asconf.c
  stable/8/sys/netinet/sctp_asconf.h
  stable/8/sys/netinet/sctp_auth.c
  stable/8/sys/netinet/sctp_auth.h
  stable/8/sys/netinet/sctp_bsd_addr.c
  stable/8/sys/netinet/sctp_bsd_addr.h
  stable/8/sys/netinet/sctp_cc_functions.c
  stable/8/sys/netinet/sctp_constants.h
  stable/8/sys/netinet/sctp_crc32.h
  stable/8/sys/netinet/sctp_dtrace_declare.h
  stable/8/sys/netinet/sctp_dtrace_define.h
  stable/8/sys/netinet/sctp_header.h
  stable/8/sys/netinet/sctp_indata.c
  stable/8/sys/netinet/sctp_indata.h
  stable/8/sys/netinet/sctp_input.c
  stable/8/sys/netinet/sctp_input.h
  stable/8/sys/netinet/sctp_os.h
  stable/8/sys/netinet/sctp_output.c
  stable/8/sys/netinet/sctp_output.h
  stable/8/sys/netinet/sctp_pcb.c
  stable/8/sys/netinet/sctp_pcb.h
  stable/8/sys/netinet/sctp_peeloff.c
  stable/8/sys/netinet/sctp_peeloff.h
  stable/8/sys/netinet/sctp_ss_functions.c
  stable/8/sys/netinet/sctp_structs.h
  stable/8/sys/netinet/sctp_sysctl.c
  stable/8/sys/netinet/sctp_sysctl.h
  stable/8/sys/netinet/sctp_timer.c
  stable/8/sys/netinet/sctp_timer.h
  stable/8/sys/netinet/sctp_uio.h
  stable/8/sys/netinet/sctp_usrreq.c
  stable/8/sys/netinet/sctp_var.h
  stable/8/sys/netinet/sctputil.c
  stable/8/sys/netinet/sctputil.h
  stable/8/sys/netinet6/sctp6_usrreq.c
  stable/8/sys/netinet6/sctp6_var.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)

Modified: stable/8/sys/netinet/sctp.h
==============================================================================
--- stable/8/sys/netinet/sctp.h	Sat Feb 11 00:51:26 2012	(r231489)
+++ stable/8/sys/netinet/sctp.h	Sat Feb 11 00:54:24 2012	(r231490)
@@ -7,11 +7,11 @@
  * modification, are permitted provided that the following conditions are met:
  *
  * a) Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
+ *    this list of conditions and the following disclaimer.
  *
  * b) Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
- *   the documentation and/or other materials provided with the distribution.
+ *    the documentation and/or other materials provided with the distribution.
  *
  * c) Neither the name of Cisco Systems, Inc. nor the names of its
  *    contributors may be used to endorse or promote products derived

Modified: stable/8/sys/netinet/sctp_asconf.c
==============================================================================
--- stable/8/sys/netinet/sctp_asconf.c	Sat Feb 11 00:51:26 2012	(r231489)
+++ stable/8/sys/netinet/sctp_asconf.c	Sat Feb 11 00:54:24 2012	(r231490)
@@ -7,11 +7,11 @@
  * modification, are permitted provided that the following conditions are met:
  *
  * a) Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
+ *    this list of conditions and the following disclaimer.
  *
  * b) Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
- *   the documentation and/or other materials provided with the distribution.
+ *    the documentation and/or other materials provided with the distribution.
  *
  * c) Neither the name of Cisco Systems, Inc. nor the names of its
  *    contributors may be used to endorse or promote products derived
@@ -1261,8 +1261,7 @@ sctp_path_check_and_react(struct sctp_tc
  * flag: 1=success, 0=failure.
  */
 static void
-sctp_asconf_addr_mgmt_ack(struct sctp_tcb *stcb, struct sctp_ifa *addr,
-    uint16_t type, uint32_t flag)
+sctp_asconf_addr_mgmt_ack(struct sctp_tcb *stcb, struct sctp_ifa *addr, uint32_t flag)
 {
 	/*
 	 * do the necessary asoc list work- if we get a failure indication,
@@ -1712,7 +1711,7 @@ sctp_asconf_process_param_ack(struct sct
 	case SCTP_ADD_IP_ADDRESS:
 		SCTPDBG(SCTP_DEBUG_ASCONF1,
 		    "process_param_ack: added IP address\n");
-		sctp_asconf_addr_mgmt_ack(stcb, aparam->ifa, param_type, flag);
+		sctp_asconf_addr_mgmt_ack(stcb, aparam->ifa, flag);
 		break;
 	case SCTP_DEL_IP_ADDRESS:
 		SCTPDBG(SCTP_DEBUG_ASCONF1,
@@ -2102,7 +2101,7 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb *
 
 
 int
-sctp_asconf_iterator_ep(struct sctp_inpcb *inp, void *ptr, uint32_t val)
+sctp_asconf_iterator_ep(struct sctp_inpcb *inp, void *ptr, uint32_t val SCTP_UNUSED)
 {
 	struct sctp_asconf_iterator *asc;
 	struct sctp_ifa *ifa;
@@ -2150,7 +2149,7 @@ sctp_asconf_iterator_ep(struct sctp_inpc
 }
 
 static int
-sctp_asconf_iterator_ep_end(struct sctp_inpcb *inp, void *ptr, uint32_t val)
+sctp_asconf_iterator_ep_end(struct sctp_inpcb *inp, void *ptr, uint32_t val SCTP_UNUSED)
 {
 	struct sctp_ifa *ifa;
 	struct sctp_asconf_iterator *asc;
@@ -2182,7 +2181,7 @@ sctp_asconf_iterator_ep_end(struct sctp_
 
 void
 sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
-    void *ptr, uint32_t val)
+    void *ptr, uint32_t val SCTP_UNUSED)
 {
 	struct sctp_asconf_iterator *asc;
 	struct sctp_ifa *ifa;
@@ -2350,7 +2349,7 @@ sctp_asconf_iterator_stcb(struct sctp_in
 }
 
 void
-sctp_asconf_iterator_end(void *ptr, uint32_t val)
+sctp_asconf_iterator_end(void *ptr, uint32_t val SCTP_UNUSED)
 {
 	struct sctp_asconf_iterator *asc;
 	struct sctp_ifa *ifa;
@@ -3009,8 +3008,7 @@ next_addr:
  * 1 if found, 0 if not
  */
 static uint32_t
-sctp_addr_in_initack(struct sctp_tcb *stcb, struct mbuf *m, uint32_t offset,
-    uint32_t length, struct sockaddr *sa)
+sctp_addr_in_initack(struct mbuf *m, uint32_t offset, uint32_t length, struct sockaddr *sa)
 {
 	struct sctp_paramhdr tmp_param, *ph;
 	uint16_t plen, ptype;
@@ -3155,8 +3153,7 @@ sctp_check_address_list_ep(struct sctp_t
 			continue;
 		}
 		/* check to see if in the init-ack */
-		if (!sctp_addr_in_initack(stcb, m, offset, length,
-		    &laddr->ifa->address.sa)) {
+		if (!sctp_addr_in_initack(m, offset, length, &laddr->ifa->address.sa)) {
 			/* try to add it */
 			sctp_addr_mgmt_assoc(stcb->sctp_ep, stcb, laddr->ifa,
 			    SCTP_ADD_IP_ADDRESS, SCTP_ADDR_NOT_LOCKED);
@@ -3179,6 +3176,15 @@ sctp_check_address_list_all(struct sctp_
 	struct sctp_ifa *sctp_ifa;
 	uint32_t vrf_id;
 
+#ifdef INET
+	struct sockaddr_in *sin;
+
+#endif
+#ifdef INET6
+	struct sockaddr_in6 *sin6;
+
+#endif
+
 	if (stcb) {
 		vrf_id = stcb->asoc.vrf_id;
 	} else {
@@ -3202,9 +3208,35 @@ sctp_check_address_list_all(struct sctp_
 			if (sctp_cmpaddr(&sctp_ifa->address.sa, init_addr)) {
 				continue;
 			}
+			switch (sctp_ifa->address.sa.sa_family) {
+#ifdef INET
+			case AF_INET:
+				sin = (struct sockaddr_in *)&sctp_ifa->address.sin;
+				if ((ipv4_scope == 0) &&
+				    (IN4_ISPRIVATE_ADDRESS(&sin->sin_addr))) {
+					/* private address not in scope */
+					continue;
+				}
+				break;
+#endif
+#ifdef INET6
+			case AF_INET6:
+				sin6 = (struct sockaddr_in6 *)&sctp_ifa->address.sin6;
+				if ((local_scope == 0) &&
+				    (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr))) {
+					continue;
+				}
+				if ((site_scope == 0) &&
+				    (IN6_IS_ADDR_SITELOCAL(&sin6->sin6_addr))) {
+					continue;
+				}
+				break;
+#endif
+			default:
+				break;
+			}
 			/* check to see if in the init-ack */
-			if (!sctp_addr_in_initack(stcb, m, offset, length,
-			    &sctp_ifa->address.sa)) {
+			if (!sctp_addr_in_initack(m, offset, length, &sctp_ifa->address.sa)) {
 				/* try to add it */
 				sctp_addr_mgmt_assoc(stcb->sctp_ep, stcb,
 				    sctp_ifa, SCTP_ADD_IP_ADDRESS,

Modified: stable/8/sys/netinet/sctp_asconf.h
==============================================================================
--- stable/8/sys/netinet/sctp_asconf.h	Sat Feb 11 00:51:26 2012	(r231489)
+++ stable/8/sys/netinet/sctp_asconf.h	Sat Feb 11 00:54:24 2012	(r231490)
@@ -7,11 +7,11 @@
  * modification, are permitted provided that the following conditions are met:
  *
  * a) Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
+ *    this list of conditions and the following disclaimer.
  *
  * b) Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
- *   the documentation and/or other materials provided with the distribution.
+ *    the documentation and/or other materials provided with the distribution.
  *
  * c) Neither the name of Cisco Systems, Inc. nor the names of its
  *    contributors may be used to endorse or promote products derived

Modified: stable/8/sys/netinet/sctp_auth.c
==============================================================================
--- stable/8/sys/netinet/sctp_auth.c	Sat Feb 11 00:51:26 2012	(r231489)
+++ stable/8/sys/netinet/sctp_auth.c	Sat Feb 11 00:54:24 2012	(r231490)
@@ -7,11 +7,11 @@
  * modification, are permitted provided that the following conditions are met:
  *
  * a) Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
+ *    this list of conditions and the following disclaimer.
  *
  * b) Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
- *   the documentation and/or other materials provided with the distribution.
+ *    the documentation and/or other materials provided with the distribution.
  *
  * c) Neither the name of Cisco Systems, Inc. nor the names of its
  *    contributors may be used to endorse or promote products derived
@@ -1891,7 +1891,7 @@ sctp_notify_authentication(struct sctp_t
 
 	/* append to socket */
 	control = sctp_build_readq_entry(stcb, stcb->asoc.primary_destination,
-	    0, 0, 0, 0, 0, 0, m_notify);
+	    0, 0, stcb->asoc.context, 0, 0, 0, m_notify);
 	if (control == NULL) {
 		/* no memory */
 		sctp_m_freem(m_notify);

Modified: stable/8/sys/netinet/sctp_auth.h
==============================================================================
--- stable/8/sys/netinet/sctp_auth.h	Sat Feb 11 00:51:26 2012	(r231489)
+++ stable/8/sys/netinet/sctp_auth.h	Sat Feb 11 00:54:24 2012	(r231490)
@@ -7,11 +7,11 @@
  * modification, are permitted provided that the following conditions are met:
  *
  * a) Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
+ *    this list of conditions and the following disclaimer.
  *
  * b) Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
- *   the documentation and/or other materials provided with the distribution.
+ *    the documentation and/or other materials provided with the distribution.
  *
  * c) Neither the name of Cisco Systems, Inc. nor the names of its
  *    contributors may be used to endorse or promote products derived

Modified: stable/8/sys/netinet/sctp_bsd_addr.c
==============================================================================
--- stable/8/sys/netinet/sctp_bsd_addr.c	Sat Feb 11 00:51:26 2012	(r231489)
+++ stable/8/sys/netinet/sctp_bsd_addr.c	Sat Feb 11 00:54:24 2012	(r231490)
@@ -7,11 +7,11 @@
  * modification, are permitted provided that the following conditions are met:
  *
  * a) Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
+ *    this list of conditions and the following disclaimer.
  *
  * b) Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
- *   the documentation and/or other materials provided with the distribution.
+ *    the documentation and/or other materials provided with the distribution.
  *
  * c) Neither the name of Cisco Systems, Inc. nor the names of its
  *    contributors may be used to endorse or promote products derived
@@ -83,11 +83,11 @@ sctp_wakeup_iterator(void)
 }
 
 static void
-sctp_iterator_thread(void *v)
+sctp_iterator_thread(void *v SCTP_UNUSED)
 {
 	SCTP_IPI_ITERATOR_WQ_LOCK();
 	/* In FreeBSD this thread never terminates. */
-	while (1) {
+	for (;;) {
 		msleep(&sctp_it_ctl.iterator_running,
 		    &sctp_it_ctl.ipi_iterator_wq_mtx,
 		    0, "waiting_for_work", 0);

Modified: stable/8/sys/netinet/sctp_bsd_addr.h
==============================================================================
--- stable/8/sys/netinet/sctp_bsd_addr.h	Sat Feb 11 00:51:26 2012	(r231489)
+++ stable/8/sys/netinet/sctp_bsd_addr.h	Sat Feb 11 00:54:24 2012	(r231490)
@@ -7,11 +7,11 @@
  * modification, are permitted provided that the following conditions are met:
  *
  * a) Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
+ *    this list of conditions and the following disclaimer.
  *
  * b) Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
- *   the documentation and/or other materials provided with the distribution.
+ *    the documentation and/or other materials provided with the distribution.
  *
  * c) Neither the name of Cisco Systems, Inc. nor the names of its
  *    contributors may be used to endorse or promote products derived

Modified: stable/8/sys/netinet/sctp_cc_functions.c
==============================================================================
--- stable/8/sys/netinet/sctp_cc_functions.c	Sat Feb 11 00:51:26 2012	(r231489)
+++ stable/8/sys/netinet/sctp_cc_functions.c	Sat Feb 11 00:54:24 2012	(r231490)
@@ -7,11 +7,11 @@
  * modification, are permitted provided that the following conditions are met:
  *
  * a) Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
+ *    this list of conditions and the following disclaimer.
  *
  * b) Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
- *   the documentation and/or other materials provided with the distribution.
+ *    the documentation and/or other materials provided with the distribution.
  *
  * c) Neither the name of Cisco Systems, Inc. nor the names of its
  *    contributors may be used to endorse or promote products derived
@@ -508,8 +508,7 @@ out_decision:
 }
 
 static int
-cc_bw_increase(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw,
-    uint64_t vtag, uint8_t inst_ind)
+cc_bw_increase(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw, uint64_t vtag)
 {
 	uint64_t oth, probepoint;
 
@@ -643,7 +642,7 @@ cc_bw_limit(struct sctp_tcb *stcb, struc
 	}
 	bw_offset = net->cc_mod.rtcc.lbw >> bw_shift;
 	if (nbw > net->cc_mod.rtcc.lbw + bw_offset) {
-		ret = cc_bw_increase(stcb, net, nbw, vtag, inst_ind);
+		ret = cc_bw_increase(stcb, net, nbw, vtag);
 		goto out;
 	}
 	rtt_offset = net->cc_mod.rtcc.lbw_rtt >> SCTP_BASE_SYSCTL(sctp_rttvar_rtt);
@@ -664,7 +663,7 @@ out:
 static void
 sctp_cwnd_update_after_sack_common(struct sctp_tcb *stcb,
     struct sctp_association *asoc,
-    int accum_moved, int reneged_all, int will_exit, int use_rtcc)
+    int accum_moved, int reneged_all SCTP_UNUSED, int will_exit, int use_rtcc)
 {
 	struct sctp_nets *net;
 	int old_cwnd;
@@ -1301,7 +1300,7 @@ sctp_cwnd_update_rtcc_tsn_acknowledged(s
 }
 
 static void
-sctp_cwnd_prepare_rtcc_net_for_sack(struct sctp_tcb *stcb,
+sctp_cwnd_prepare_rtcc_net_for_sack(struct sctp_tcb *stcb SCTP_UNUSED,
     struct sctp_nets *net)
 {
 	if (net->cc_mod.rtcc.tls_needs_set > 0) {
@@ -1473,7 +1472,7 @@ sctp_cwnd_rtcc_socket_option(struct sctp
 }
 
 static void
-sctp_cwnd_update_rtcc_packet_transmitted(struct sctp_tcb *stcb,
+sctp_cwnd_update_rtcc_packet_transmitted(struct sctp_tcb *stcb SCTP_UNUSED,
     struct sctp_nets *net)
 {
 	if (net->cc_mod.rtcc.tls_needs_set == 0) {
@@ -1492,8 +1491,9 @@ sctp_cwnd_update_rtcc_after_sack(struct 
 }
 
 static void
-sctp_rtt_rtcc_calculated(struct sctp_tcb *stcb,
-    struct sctp_nets *net, struct timeval *now)
+sctp_rtt_rtcc_calculated(struct sctp_tcb *stcb SCTP_UNUSED,
+    struct sctp_nets *net,
+    struct timeval *now SCTP_UNUSED)
 {
 	net->cc_mod.rtcc.rtt_set_this_sack = 1;
 }
@@ -1731,7 +1731,7 @@ sctp_hs_cwnd_update_after_fr(struct sctp
 static void
 sctp_hs_cwnd_update_after_sack(struct sctp_tcb *stcb,
     struct sctp_association *asoc,
-    int accum_moved, int reneged_all, int will_exit)
+    int accum_moved, int reneged_all SCTP_UNUSED, int will_exit)
 {
 	struct sctp_nets *net;
 
@@ -1879,7 +1879,7 @@ htcp_cwnd_undo(struct sctp_tcb *stcb, st
 #endif
 
 static inline void
-measure_rtt(struct sctp_tcb *stcb, struct sctp_nets *net)
+measure_rtt(struct sctp_nets *net)
 {
 	uint32_t srtt = net->lastsa >> SCTP_RTT_SHIFT;
 
@@ -1897,7 +1897,7 @@ measure_rtt(struct sctp_tcb *stcb, struc
 }
 
 static void
-measure_achieved_throughput(struct sctp_tcb *stcb, struct sctp_nets *net)
+measure_achieved_throughput(struct sctp_nets *net)
 {
 	uint32_t now = sctp_get_tick_count();
 
@@ -1997,7 +1997,7 @@ htcp_alpha_update(struct htcp *ca)
  * were getting just too full now).
  */
 static void
-htcp_param_update(struct sctp_tcb *stcb, struct sctp_nets *net)
+htcp_param_update(struct sctp_nets *net)
 {
 	uint32_t minRTT = net->cc_mod.htcp_ca.minRTT;
 	uint32_t maxRTT = net->cc_mod.htcp_ca.maxRTT;
@@ -2014,9 +2014,9 @@ htcp_param_update(struct sctp_tcb *stcb,
 }
 
 static uint32_t
-htcp_recalc_ssthresh(struct sctp_tcb *stcb, struct sctp_nets *net)
+htcp_recalc_ssthresh(struct sctp_nets *net)
 {
-	htcp_param_update(stcb, net);
+	htcp_param_update(net);
 	return max(((net->cwnd / net->mtu * net->cc_mod.htcp_ca.beta) >> 7) * net->mtu, 2U * net->mtu);
 }
 
@@ -2051,7 +2051,7 @@ htcp_cong_avoid(struct sctp_tcb *stcb, s
 			}
 		}
 	} else {
-		measure_rtt(stcb, net);
+		measure_rtt(net);
 
 		/*
 		 * In dangerous area, increase slowly. In theory this is
@@ -2093,7 +2093,7 @@ htcp_min_cwnd(struct sctp_tcb *stcb, str
 #endif
 
 static void
-htcp_init(struct sctp_tcb *stcb, struct sctp_nets *net)
+htcp_init(struct sctp_nets *net)
 {
 	memset(&net->cc_mod.htcp_ca, 0, sizeof(struct htcp));
 	net->cc_mod.htcp_ca.alpha = ALPHA_BASE;
@@ -2111,7 +2111,7 @@ sctp_htcp_set_initial_cc_param(struct sc
 	 */
 	net->cwnd = min((net->mtu * 4), max((2 * net->mtu), SCTP_INITIAL_CWND));
 	net->ssthresh = stcb->asoc.peers_rwnd;
-	htcp_init(stcb, net);
+	htcp_init(net);
 
 	if (SCTP_BASE_SYSCTL(sctp_logging_level) & (SCTP_CWND_MONITOR_ENABLE | SCTP_CWND_LOGGING_ENABLE)) {
 		sctp_log_cwnd(stcb, net, 0, SCTP_CWND_INITIALIZATION);
@@ -2121,7 +2121,7 @@ sctp_htcp_set_initial_cc_param(struct sc
 static void
 sctp_htcp_cwnd_update_after_sack(struct sctp_tcb *stcb,
     struct sctp_association *asoc,
-    int accum_moved, int reneged_all, int will_exit)
+    int accum_moved, int reneged_all SCTP_UNUSED, int will_exit)
 {
 	struct sctp_nets *net;
 
@@ -2176,7 +2176,7 @@ sctp_htcp_cwnd_update_after_sack(struct 
 		if (accum_moved ||
 		    ((asoc->sctp_cmt_on_off > 0) && net->new_pseudo_cumack)) {
 			htcp_cong_avoid(stcb, net);
-			measure_achieved_throughput(stcb, net);
+			measure_achieved_throughput(net);
 		} else {
 			if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) {
 				sctp_log_cwnd(stcb, net, net->mtu,
@@ -2212,7 +2212,7 @@ sctp_htcp_cwnd_update_after_fr(struct sc
 
 				/* JRS - reset as if state were changed */
 				htcp_reset(&net->cc_mod.htcp_ca);
-				net->ssthresh = htcp_recalc_ssthresh(stcb, net);
+				net->ssthresh = htcp_recalc_ssthresh(net);
 				net->cwnd = net->ssthresh;
 				if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) {
 					sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd),
@@ -2266,7 +2266,7 @@ sctp_htcp_cwnd_update_after_timeout(stru
 
 	/* JRS - reset as if the state were being changed to timeout */
 	htcp_reset(&net->cc_mod.htcp_ca);
-	net->ssthresh = htcp_recalc_ssthresh(stcb, net);
+	net->ssthresh = htcp_recalc_ssthresh(net);
 	net->cwnd = net->mtu;
 	net->partial_bytes_acked = 0;
 	if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) {
@@ -2276,7 +2276,7 @@ sctp_htcp_cwnd_update_after_timeout(stru
 
 static void
 sctp_htcp_cwnd_update_after_ecn_echo(struct sctp_tcb *stcb,
-    struct sctp_nets *net, int in_window, int num_pkt_lost)
+    struct sctp_nets *net, int in_window, int num_pkt_lost SCTP_UNUSED)
 {
 	int old_cwnd;
 
@@ -2286,7 +2286,7 @@ sctp_htcp_cwnd_update_after_ecn_echo(str
 	if (in_window == 0) {
 		htcp_reset(&net->cc_mod.htcp_ca);
 		SCTP_STAT_INCR(sctps_ecnereducedcwnd);
-		net->ssthresh = htcp_recalc_ssthresh(stcb, net);
+		net->ssthresh = htcp_recalc_ssthresh(net);
 		if (net->ssthresh < net->mtu) {
 			net->ssthresh = net->mtu;
 			/* here back off the timer as well, to slow us down */

Modified: stable/8/sys/netinet/sctp_constants.h
==============================================================================
--- stable/8/sys/netinet/sctp_constants.h	Sat Feb 11 00:51:26 2012	(r231489)
+++ stable/8/sys/netinet/sctp_constants.h	Sat Feb 11 00:54:24 2012	(r231490)
@@ -7,11 +7,11 @@
  * modification, are permitted provided that the following conditions are met:
  *
  * a) Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
+ *    this list of conditions and the following disclaimer.
  *
  * b) Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
- *   the documentation and/or other materials provided with the distribution.
+ *    the documentation and/or other materials provided with the distribution.
  *
  * c) Neither the name of Cisco Systems, Inc. nor the names of its
  *    contributors may be used to endorse or promote products derived
@@ -1017,20 +1017,9 @@ __FBSDID("$FreeBSD$");
 
 
 #if defined(_KERNEL)
-
-#define SCTP_GETTIME_TIMESPEC(x) (getnanouptime(x))
-#define SCTP_GETTIME_TIMEVAL(x)	(getmicrouptime(x))
-#define SCTP_GETPTIME_TIMEVAL(x)	(microuptime(x))
+#define SCTP_GETTIME_TIMEVAL(x) (getmicrouptime(x))
+#define SCTP_GETPTIME_TIMEVAL(x) (microuptime(x))
 #endif
-/*#if defined(__FreeBSD__) || defined(__APPLE__)*/
-/*#define SCTP_GETTIME_TIMEVAL(x) { \*/
-/*	(x)->tv_sec = ticks / 1000; \*/
-/*	(x)->tv_usec = (ticks % 1000) * 1000; \*/
-/*}*/
-
-/*#else*/
-/*#define SCTP_GETTIME_TIMEVAL(x)	(microtime(x))*/
-/*#endif				 __FreeBSD__ */
 
 #if defined(_KERNEL) || defined(__Userspace__)
 #define sctp_sowwakeup(inp, so) \

Modified: stable/8/sys/netinet/sctp_crc32.h
==============================================================================
--- stable/8/sys/netinet/sctp_crc32.h	Sat Feb 11 00:51:26 2012	(r231489)
+++ stable/8/sys/netinet/sctp_crc32.h	Sat Feb 11 00:54:24 2012	(r231490)
@@ -7,11 +7,11 @@
  * modification, are permitted provided that the following conditions are met:
  *
  * a) Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
+ *    this list of conditions and the following disclaimer.
  *
  * b) Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
- *   the documentation and/or other materials provided with the distribution.
+ *    the documentation and/or other materials provided with the distribution.
  *
  * c) Neither the name of Cisco Systems, Inc. nor the names of its
  *    contributors may be used to endorse or promote products derived

Modified: stable/8/sys/netinet/sctp_dtrace_declare.h
==============================================================================
--- stable/8/sys/netinet/sctp_dtrace_declare.h	Sat Feb 11 00:51:26 2012	(r231489)
+++ stable/8/sys/netinet/sctp_dtrace_declare.h	Sat Feb 11 00:54:24 2012	(r231490)
@@ -6,11 +6,11 @@
  * modification, are permitted provided that the following conditions are met:
  *
  * a) Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
+ *    this list of conditions and the following disclaimer.
  *
  * b) Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
- *   the documentation and/or other materials provided with the distribution.
+ *    the documentation and/or other materials provided with the distribution.
  *
  * c) Neither the name of Cisco Systems, Inc. nor the names of its
  *    contributors may be used to endorse or promote products derived

Modified: stable/8/sys/netinet/sctp_dtrace_define.h
==============================================================================
--- stable/8/sys/netinet/sctp_dtrace_define.h	Sat Feb 11 00:51:26 2012	(r231489)
+++ stable/8/sys/netinet/sctp_dtrace_define.h	Sat Feb 11 00:54:24 2012	(r231490)
@@ -6,11 +6,11 @@
  * modification, are permitted provided that the following conditions are met:
  *
  * a) Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
+ *    this list of conditions and the following disclaimer.
  *
  * b) Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
- *   the documentation and/or other materials provided with the distribution.
+ *    the documentation and/or other materials provided with the distribution.
  *
  * c) Neither the name of Cisco Systems, Inc. nor the names of its
  *    contributors may be used to endorse or promote products derived

Modified: stable/8/sys/netinet/sctp_header.h
==============================================================================
--- stable/8/sys/netinet/sctp_header.h	Sat Feb 11 00:51:26 2012	(r231489)
+++ stable/8/sys/netinet/sctp_header.h	Sat Feb 11 00:54:24 2012	(r231490)
@@ -7,11 +7,11 @@
  * modification, are permitted provided that the following conditions are met:
  *
  * a) Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
+ *    this list of conditions and the following disclaimer.
  *
  * b) Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
- *   the documentation and/or other materials provided with the distribution.
+ *    the documentation and/or other materials provided with the distribution.
  *
  * c) Neither the name of Cisco Systems, Inc. nor the names of its
  *    contributors may be used to endorse or promote products derived

Modified: stable/8/sys/netinet/sctp_indata.c
==============================================================================
--- stable/8/sys/netinet/sctp_indata.c	Sat Feb 11 00:51:26 2012	(r231489)
+++ stable/8/sys/netinet/sctp_indata.c	Sat Feb 11 00:54:24 2012	(r231490)
@@ -7,11 +7,11 @@
  * modification, are permitted provided that the following conditions are met:
  *
  * a) Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
+ *    this list of conditions and the following disclaimer.
  *
  * b) Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
- *   the documentation and/or other materials provided with the distribution.
+ *    the documentation and/or other materials provided with the distribution.
  *
  * c) Neither the name of Cisco Systems, Inc. nor the names of its
  *    contributors may be used to endorse or promote products derived
@@ -137,7 +137,7 @@ sctp_build_readq_entry(struct sctp_tcb *
 	read_queue_e->sinfo_ssn = stream_seq;
 	read_queue_e->sinfo_flags = (flags << 8);
 	read_queue_e->sinfo_ppid = ppid;
-	read_queue_e->sinfo_context = stcb->asoc.context;
+	read_queue_e->sinfo_context = context;
 	read_queue_e->sinfo_timetolive = 0;
 	read_queue_e->sinfo_tsn = tsn;
 	read_queue_e->sinfo_cumtsn = tsn;
@@ -846,7 +846,6 @@ sctp_queue_data_for_reasm(struct sctp_tc
 {
 	struct mbuf *oper;
 	uint32_t cum_ackp1, last_tsn, prev_tsn, post_tsn;
-	u_char last_flags;
 	struct sctp_tmit_chunk *at, *prev, *next;
 
 	prev = next = NULL;
@@ -1033,7 +1032,6 @@ sctp_queue_data_for_reasm(struct sctp_tc
 			sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED);
 			return;
 		} else {
-			last_flags = at->rec.data.rcv_flags;
 			last_tsn = at->rec.data.TSN_seq;
 			prev = at;
 			if (TAILQ_NEXT(at, sctp_next) == NULL) {
@@ -1455,7 +1453,7 @@ sctp_process_a_data_chunk(struct sctp_tc
 	struct sctp_tmit_chunk *chk;
 	uint32_t tsn, gap;
 	struct mbuf *dmbuf;
-	int indx, the_len;
+	int the_len;
 	int need_reasm_check = 0;
 	uint16_t strmno, strmseq;
 	struct mbuf *oper;
@@ -1587,7 +1585,6 @@ sctp_process_a_data_chunk(struct sctp_tc
 			} else {
 				SCTP_STAT_INCR(sctps_datadroprwnd);
 			}
-			indx = *break_flag;
 			*break_flag = 1;
 			return (0);
 		}
@@ -2259,7 +2256,6 @@ sctp_slide_mapping_arrays(struct sctp_tc
 	uint32_t old_cumack, old_base, old_highest, highest_tsn;
 
 	asoc = &stcb->asoc;
-	at = 0;
 
 	old_cumack = asoc->cumulative_tsn;
 	old_base = asoc->mapping_array_base_tsn;
@@ -2408,7 +2404,7 @@ sctp_slide_mapping_arrays(struct sctp_tc
 }
 
 void
-sctp_sack_check(struct sctp_tcb *stcb, int was_a_gap, int *abort_flag)
+sctp_sack_check(struct sctp_tcb *stcb, int was_a_gap)
 {
 	struct sctp_association *asoc;
 	uint32_t highest_tsn;
@@ -2824,10 +2820,7 @@ sctp_process_data(struct mbuf **mm, int 
 		stcb->asoc.send_sack = 1;
 	}
 	/* Start a sack timer or QUEUE a SACK for sending */
-	sctp_sack_check(stcb, was_a_gap, &abort_flag);
-	if (abort_flag)
-		return (2);
-
+	sctp_sack_check(stcb, was_a_gap);
 	return (0);
 }
 
@@ -2837,7 +2830,7 @@ sctp_process_segment_range(struct sctp_t
     int *num_frs,
     uint32_t * biggest_newly_acked_tsn,
     uint32_t * this_sack_lowest_newack,
-    int *ecn_seg_sums, int *rto_ok)
+    int *rto_ok)
 {
 	struct sctp_tmit_chunk *tp1;
 	unsigned int theTSN;
@@ -3059,8 +3052,7 @@ static int
 sctp_handle_segments(struct mbuf *m, int *offset, struct sctp_tcb *stcb, struct sctp_association *asoc,
     uint32_t last_tsn, uint32_t * biggest_tsn_acked,
     uint32_t * biggest_newly_acked_tsn, uint32_t * this_sack_lowest_newack,
-    int num_seg, int num_nr_seg, int *ecn_seg_sums,
-    int *rto_ok)
+    int num_seg, int num_nr_seg, int *rto_ok)
 {
 	struct sctp_gap_ack_block *frag, block;
 	struct sctp_tmit_chunk *tp1;
@@ -3106,7 +3098,7 @@ sctp_handle_segments(struct mbuf *m, int
 		}
 		if (sctp_process_segment_range(stcb, &tp1, last_tsn, frag_strt, frag_end,
 		    non_revocable, &num_frs, biggest_newly_acked_tsn,
-		    this_sack_lowest_newack, ecn_seg_sums, rto_ok)) {
+		    this_sack_lowest_newack, rto_ok)) {
 			chunk_freed = 1;
 		}
 		prev_frag_end = frag_end;
@@ -3761,7 +3753,6 @@ sctp_fs_audit(struct sctp_association *a
 static void
 sctp_window_probe_recovery(struct sctp_tcb *stcb,
     struct sctp_association *asoc,
-    struct sctp_nets *net,
     struct sctp_tmit_chunk *tp1)
 {
 	tp1->window_probe = 0;
@@ -4029,7 +4020,7 @@ sctp_express_handle_sack(struct sctp_tcb
 		SOCKBUF_LOCK(&stcb->sctp_socket->so_snd);
 		if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) {
 			/* sa_ignore NO_NULL_CHK */
-			sctp_wakeup_log(stcb, cumack, 1, SCTP_WAKESND_FROM_SACK);
+			sctp_wakeup_log(stcb, 1, SCTP_WAKESND_FROM_SACK);
 		}
 #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
 		so = SCTP_INP_SO(stcb->sctp_ep);
@@ -4050,7 +4041,7 @@ sctp_express_handle_sack(struct sctp_tcb
 #endif
 	} else {
 		if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) {
-			sctp_wakeup_log(stcb, cumack, 1, SCTP_NOWAKE_FROM_SACK);
+			sctp_wakeup_log(stcb, 1, SCTP_NOWAKE_FROM_SACK);
 		}
 	}
 
@@ -4136,7 +4127,7 @@ again:
 			TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) {
 				if (tp1->window_probe) {
 					/* move back to data send queue */
-					sctp_window_probe_recovery(stcb, asoc, net, tp1);
+					sctp_window_probe_recovery(stcb, asoc, tp1);
 					break;
 				}
 			}
@@ -4344,7 +4335,7 @@ again:
 
 void
 sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
-    struct sctp_tcb *stcb, struct sctp_nets *net_from,
+    struct sctp_tcb *stcb,
     uint16_t num_seg, uint16_t num_nr_seg, uint16_t num_dup,
     int *abort_now, uint8_t flags,
     uint32_t cum_ack, uint32_t rwnd, int ecne_seen)
@@ -4352,7 +4343,6 @@ sctp_handle_sack(struct mbuf *m, int off
 	struct sctp_association *asoc;
 	struct sctp_tmit_chunk *tp1, *tp2;
 	uint32_t last_tsn, biggest_tsn_acked, biggest_tsn_newly_acked, this_sack_lowest_newack;
-	uint32_t sav_cum_ack;
 	uint16_t wake_him = 0;
 	uint32_t send_s = 0;
 	long j;
@@ -4362,7 +4352,6 @@ sctp_handle_sack(struct mbuf *m, int off
 	int win_probe_recovery = 0;
 	int win_probe_recovered = 0;
 	struct sctp_nets *net = NULL;
-	int ecn_seg_sums = 0;
 	int done_once;
 	int rto_ok = 1;
 	uint8_t reneged_all = 0;
@@ -4392,7 +4381,6 @@ sctp_handle_sack(struct mbuf *m, int off
 	SCTP_TCB_LOCK_ASSERT(stcb);
 	/* CMT DAC algo */
 	this_sack_lowest_newack = 0;
-	j = 0;
 	SCTP_STAT_INCR(sctps_slowpath_sack);
 	last_tsn = cum_ack;
 	cmt_dac_flag = flags & SCTP_SACK_CMT_DAC;
@@ -4492,8 +4480,6 @@ sctp_handle_sack(struct mbuf *m, int off
 		/* acking something behind */
 		return;
 	}
-	sav_cum_ack = asoc->last_acked_seq;
-
 	/* update the Rwnd of the peer */
 	if (TAILQ_EMPTY(&asoc->sent_queue) &&
 	    TAILQ_EMPTY(&asoc->send_queue) &&
@@ -4690,8 +4676,7 @@ sctp_handle_sack(struct mbuf *m, int off
 		 */
 		if (sctp_handle_segments(m, &offset_seg, stcb, asoc, last_tsn, &biggest_tsn_acked,
 		    &biggest_tsn_newly_acked, &this_sack_lowest_newack,
-		    num_seg, num_nr_seg, &ecn_seg_sums,
-		    &rto_ok)) {
+		    num_seg, num_nr_seg, &rto_ok)) {
 			wake_him++;
 		}
 		if (SCTP_BASE_SYSCTL(sctp_strict_sacks)) {
@@ -4788,7 +4773,7 @@ sctp_handle_sack(struct mbuf *m, int off
 #endif
 		SOCKBUF_LOCK(&stcb->sctp_socket->so_snd);
 		if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) {
-			sctp_wakeup_log(stcb, cum_ack, wake_him, SCTP_WAKESND_FROM_SACK);
+			sctp_wakeup_log(stcb, wake_him, SCTP_WAKESND_FROM_SACK);
 		}
 #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
 		so = SCTP_INP_SO(stcb->sctp_ep);
@@ -4809,7 +4794,7 @@ sctp_handle_sack(struct mbuf *m, int off
 #endif
 	} else {
 		if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_WAKE_LOGGING_ENABLE) {
-			sctp_wakeup_log(stcb, cum_ack, wake_him, SCTP_NOWAKE_FROM_SACK);
+			sctp_wakeup_log(stcb, wake_him, SCTP_NOWAKE_FROM_SACK);
 		}
 	}
 
@@ -5112,7 +5097,7 @@ again:
 			 */
 			TAILQ_FOREACH(tp1, &asoc->sent_queue, sctp_next) {
 				if (tp1->window_probe) {
-					sctp_window_probe_recovery(stcb, asoc, net, tp1);
+					sctp_window_probe_recovery(stcb, asoc, tp1);
 					break;
 				}
 			}
@@ -5222,8 +5207,7 @@ again:
 }
 
 void
-sctp_update_acked(struct sctp_tcb *stcb, struct sctp_shutdown_chunk *cp,
-    struct sctp_nets *netp, int *abort_flag)
+sctp_update_acked(struct sctp_tcb *stcb, struct sctp_shutdown_chunk *cp, int *abort_flag)
 {
 	/* Copy cum-ack */
 	uint32_t cum_ack, a_rwnd;
@@ -5389,13 +5373,12 @@ sctp_handle_forward_tsn(struct sctp_tcb 
 	 */
 	struct sctp_association *asoc;
 	uint32_t new_cum_tsn, gap;
-	unsigned int i, fwd_sz, cumack_set_flag, m_size;
+	unsigned int i, fwd_sz, m_size;
 	uint32_t str_seq;
 	struct sctp_stream_in *strm;
 	struct sctp_tmit_chunk *chk, *nchk;
 	struct sctp_queued_to_read *ctl, *sv;
 
-	cumack_set_flag = 0;
 	asoc = &stcb->asoc;
 	if ((fwd_sz = ntohs(fwd->ch.chunk_length)) < sizeof(struct sctp_forward_tsn_chunk)) {
 		SCTPDBG(SCTP_DEBUG_INDATA1,

Modified: stable/8/sys/netinet/sctp_indata.h
==============================================================================
--- stable/8/sys/netinet/sctp_indata.h	Sat Feb 11 00:51:26 2012	(r231489)
+++ stable/8/sys/netinet/sctp_indata.h	Sat Feb 11 00:54:24 2012	(r231490)
@@ -7,11 +7,11 @@
  * modification, are permitted provided that the following conditions are met:
  *
  * a) Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
+ *    this list of conditions and the following disclaimer.
  *
  * b) Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
- *   the documentation and/or other materials provided with the distribution.
+ *    the documentation and/or other materials provided with the distribution.
  *
  * c) Neither the name of Cisco Systems, Inc. nor the names of its
  *    contributors may be used to endorse or promote products derived
@@ -94,7 +94,7 @@ sctp_express_handle_sack(struct sctp_tcb
 
 void
 sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup,
-    struct sctp_tcb *stcb, struct sctp_nets *net_from,
+    struct sctp_tcb *stcb,
     uint16_t num_seg, uint16_t num_nr_seg, uint16_t num_dup,
     int *abort_now, uint8_t flags,
     uint32_t cum_ack, uint32_t rwnd, int ecne_seen);
@@ -110,8 +110,7 @@ struct sctp_tmit_chunk *
 void sctp_service_queues(struct sctp_tcb *, struct sctp_association *);
 
 void
-sctp_update_acked(struct sctp_tcb *, struct sctp_shutdown_chunk *,
-    struct sctp_nets *, int *);
+     sctp_update_acked(struct sctp_tcb *, struct sctp_shutdown_chunk *, int *);
 
 int
 sctp_process_data(struct mbuf **, int, int *, int, struct sctphdr *,
@@ -120,7 +119,7 @@ sctp_process_data(struct mbuf **, int, i
 
 void sctp_slide_mapping_arrays(struct sctp_tcb *stcb);
 
-void sctp_sack_check(struct sctp_tcb *, int, int *);
+void sctp_sack_check(struct sctp_tcb *, int);
 
 #endif
 #endif

Modified: stable/8/sys/netinet/sctp_input.c
==============================================================================
--- stable/8/sys/netinet/sctp_input.c	Sat Feb 11 00:51:26 2012	(r231489)
+++ stable/8/sys/netinet/sctp_input.c	Sat Feb 11 00:54:24 2012	(r231490)
@@ -7,11 +7,11 @@
  * modification, are permitted provided that the following conditions are met:
  *
  * a) Redistributions of source code must retain the above copyright notice,
- *   this list of conditions and the following disclaimer.
+ *    this list of conditions and the following disclaimer.
  *
  * b) Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in
- *   the documentation and/or other materials provided with the distribution.
+ *    the documentation and/or other materials provided with the distribution.
  *
  * c) Neither the name of Cisco Systems, Inc. nor the names of its
  *    contributors may be used to endorse or promote products derived
@@ -84,7 +84,7 @@ sctp_stop_all_cookie_timers(struct sctp_
 static void
 sctp_handle_init(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh,
     struct sctp_init_chunk *cp, struct sctp_inpcb *inp, struct sctp_tcb *stcb,
-    struct sctp_nets *net, int *abort_no_unlock, uint32_t vrf_id, uint16_t port)
+    int *abort_no_unlock, uint32_t vrf_id, uint16_t port)
 {
 	struct sctp_init *init;
 	struct mbuf *op_err;
@@ -258,8 +258,7 @@ sctp_is_there_unsent_data(struct sctp_tc
 }
 
 static int
-sctp_process_init(struct sctp_init_chunk *cp, struct sctp_tcb *stcb,
-    struct sctp_nets *net)
+sctp_process_init(struct sctp_init_chunk *cp, struct sctp_tcb *stcb)
 {
 	struct sctp_init *init;
 	struct sctp_association *asoc;
@@ -433,13 +432,13 @@ sctp_process_init_ack(struct mbuf *m, in
 	asoc = &stcb->asoc;
 	asoc->peer_supports_nat = (uint8_t) nat_friendly;
 	/* process the peer's parameters in the INIT-ACK */
-	retval = sctp_process_init((struct sctp_init_chunk *)cp, stcb, net);
+	retval = sctp_process_init((struct sctp_init_chunk *)cp, stcb);
 	if (retval < 0) {
 		return (retval);
 	}
 	initack_limit = offset + ntohs(cp->ch.chunk_length);
 	/* load all addresses */
-	if ((retval = sctp_load_addresses_from_init(stcb, m, iphlen,
+	if ((retval = sctp_load_addresses_from_init(stcb, m,
 	    (offset + sizeof(struct sctp_init_chunk)), initack_limit, sh,
 	    NULL))) {
 		/* Huh, we should abort */
@@ -521,7 +520,7 @@ sctp_process_init_ack(struct mbuf *m, in
 				mp->resv = 0;
 			}
 			sctp_abort_association(stcb->sctp_ep, stcb, m, iphlen,
-			    sh, op_err, 0, net->port);
+			    sh, op_err, vrf_id, net->port);
 			*abort_no_unlock = 1;
 		}
 		return (retval);
@@ -871,7 +870,7 @@ sctp_handle_shutdown(struct sctp_shutdow
 		/* Shutdown NOT the expected size */
 		return;
 	} else {
-		sctp_update_acked(stcb, cp, net, abort_flag);
+		sctp_update_acked(stcb, cp, abort_flag);
 		if (*abort_flag) {
 			return;
 		}
@@ -953,7 +952,7 @@ sctp_handle_shutdown(struct sctp_shutdow
 }
 
 static void
-sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chunk *cp,
+sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chunk *cp SCTP_UNUSED,
     struct sctp_tcb *stcb,
     struct sctp_nets *net)
 {
@@ -1410,7 +1409,7 @@ static struct sctp_tcb *
 sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset,
     struct sctphdr *sh, struct sctp_state_cookie *cookie, int cookie_len,
     struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sctp_nets **netp,
-    struct sockaddr *init_src, int *notification, sctp_assoc_t * sac_assoc_id,
+    struct sockaddr *init_src, int *notification,
     uint32_t vrf_id, int auth_skipped, uint32_t auth_offset, uint32_t auth_len, uint16_t port)
 {
 	struct sctp_association *asoc;
@@ -1526,7 +1525,7 @@ sctp_process_cookie_existing(struct mbuf
 			 * the right seq no's.
 			 */
 			/* First we must process the INIT !! */
-			retval = sctp_process_init(init_cp, stcb, net);
+			retval = sctp_process_init(init_cp, stcb);
 			if (retval < 0) {
 				if (how_indx < sizeof(asoc->cookie_how))
 					asoc->cookie_how[how_indx] = 3;
@@ -1613,7 +1612,7 @@ sctp_process_cookie_existing(struct mbuf
 		 * somehow abort.. but we do have an existing asoc. This
 		 * really should not fail.
 		 */
-		if (sctp_load_addresses_from_init(stcb, m, iphlen,
+		if (sctp_load_addresses_from_init(stcb, m,
 		    init_offset + sizeof(struct sctp_init_chunk),
 		    initack_offset, sh, init_src)) {
 			if (how_indx < sizeof(asoc->cookie_how))
@@ -1749,13 +1748,13 @@ sctp_process_cookie_existing(struct mbuf
 
 		}
 		/* process the INIT info (peer's info) */
-		retval = sctp_process_init(init_cp, stcb, net);
+		retval = sctp_process_init(init_cp, stcb);
 		if (retval < 0) {
 			if (how_indx < sizeof(asoc->cookie_how))
 				asoc->cookie_how[how_indx] = 9;
 			return (NULL);
 		}
-		if (sctp_load_addresses_from_init(stcb, m, iphlen,
+		if (sctp_load_addresses_from_init(stcb, m,
 		    init_offset + sizeof(struct sctp_init_chunk),
 		    initack_offset, sh, init_src)) {
 			if (how_indx < sizeof(asoc->cookie_how))
@@ -1852,7 +1851,6 @@ sctp_process_cookie_existing(struct mbuf
 		sctp_timer_stop(SCTP_TIMER_TYPE_INIT, inp, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_15);
 		sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_16);
 
-		*sac_assoc_id = sctp_get_associd(stcb);
 		/* notify upper layer */
 		*notification = SCTP_NOTIFY_ASSOC_RESTART;
 		atomic_add_int(&stcb->asoc.refcnt, 1);
@@ -1928,7 +1926,7 @@ sctp_process_cookie_existing(struct mbuf
 		SCTP_INP_WUNLOCK(stcb->sctp_ep);
 		SCTP_INP_INFO_WUNLOCK();

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202110054.q1B0sODo005283>