1 diff --git a/usrsctplib/netinet/sctp_cc_functions.c b/usrsctplib/netinet/sctp_cc_functions.c
2 index 57bcdaa..70cf8b7 100755
3 --- a/usrsctplib/netinet/sctp_cc_functions.c
4 +++ b/usrsctplib/netinet/sctp_cc_functions.c
5 @@ -764,7 +764,7 @@ sctp_cwnd_update_after_sack_common(struct sctp_tcb *stcb,
6 #if defined(__FreeBSD__) && !defined(__Userspace__)
9 - uint32_t t_ssthresh, t_cwnd, incr;
10 + uint32_t t_ssthresh, incr;
12 uint64_t t_path_mptcp;
13 uint64_t mptcp_like_alpha;
14 @@ -773,7 +773,6 @@ sctp_cwnd_update_after_sack_common(struct sctp_tcb *stcb,
16 /* MT FIXME: Don't compute this over and over again */
22 @@ -783,7 +782,6 @@ sctp_cwnd_update_after_sack_common(struct sctp_tcb *stcb,
24 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
25 t_ssthresh += net->ssthresh;
26 - t_cwnd += net->cwnd;
27 /* lastsa>>3; we don't need to devide ...*/
30 diff --git a/usrsctplib/netinet/sctp_indata.c b/usrsctplib/netinet/sctp_indata.c
31 index 3bce9e9..42ce111 100755
32 --- a/usrsctplib/netinet/sctp_indata.c
33 +++ b/usrsctplib/netinet/sctp_indata.c
34 @@ -3320,7 +3320,6 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, struct sctp_association *asoc,
35 struct sctp_tmit_chunk *tp1;
38 - int tot_retrans = 0;
40 struct sctp_nets *net;
41 int num_dests_sacked = 0;
42 @@ -3691,7 +3690,6 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, struct sctp_association *asoc,
45 tp1->rec.data.doing_fast_retransmit = 1;
47 /* mark the sending seq for possible subsequent FR's */
49 * SCTP_PRINTF("Marking TSN for FR new value %x\n",
50 diff --git a/usrsctplib/netinet/sctp_output.c b/usrsctplib/netinet/sctp_output.c
51 index 6a7dff9..a914b3b 100755
52 --- a/usrsctplib/netinet/sctp_output.c
53 +++ b/usrsctplib/netinet/sctp_output.c
54 @@ -9970,7 +9970,7 @@ sctp_chunk_retransmission(struct sctp_inpcb *inp,
55 struct mbuf *m, *endofchain;
56 struct sctp_nets *net = NULL;
57 uint32_t tsns_sent = 0;
58 - int no_fragmentflg, bundle_at, cnt_thru;
59 + int no_fragmentflg, bundle_at;
61 int error, i, one_chunk, fwd_tsn, ctl_cnt, tmr_started;
62 struct sctp_auth_chunk *auth = NULL;
63 @@ -10046,7 +10046,6 @@ sctp_chunk_retransmission(struct sctp_inpcb *inp,
68 /* do we have control chunks to retransmit? */
70 /* Start a timer no matter if we succeed or fail */
71 @@ -10368,7 +10367,6 @@ sctp_chunk_retransmission(struct sctp_inpcb *inp,
72 /* (void)SCTP_GETTIME_TIMEVAL(&net->last_sent_time); */
76 if (*now_filled == 0) {
77 (void)SCTP_GETTIME_TIMEVAL(&asoc->time_last_sent);
78 *now = asoc->time_last_sent;
79 @@ -13416,7 +13414,7 @@ sctp_lower_sosend(struct socket *so,
80 struct epoch_tracker et;
82 ssize_t sndlen = 0, max_len, local_add_more;
85 struct mbuf *top = NULL;
86 int queue_only = 0, queue_only_for_init = 0;
87 int free_cnt_applied = 0;
88 @@ -14035,7 +14033,6 @@ sctp_lower_sosend(struct socket *so,
90 local_add_more = sndlen;
96 @@ -14265,7 +14262,6 @@ skip_preblock:
98 sctp_snd_sb_alloc(stcb, sndout);
99 atomic_add_int(&sp->length, sndout);
101 if (sinfo_flags & SCTP_SACK_IMMEDIATELY) {
102 sp->sinfo_flags |= SCTP_SACK_IMMEDIATELY;
104 diff --git a/usrsctplib/netinet/sctp_pcb.c b/usrsctplib/netinet/sctp_pcb.c
105 index 89a66bc..a952921 100755
106 --- a/usrsctplib/netinet/sctp_pcb.c
107 +++ b/usrsctplib/netinet/sctp_pcb.c
108 @@ -7943,7 +7943,7 @@ sctp_drain_mbufs(struct sctp_tcb *stcb)
116 * We must walk the PCB lists for ALL associations here. The system
117 diff --git a/usrsctplib/netinet/sctp_sysctl.c b/usrsctplib/netinet/sctp_sysctl.c
118 index bb49e17..8b77f7e 100755
119 --- a/usrsctplib/netinet/sctp_sysctl.c
120 +++ b/usrsctplib/netinet/sctp_sysctl.c
121 @@ -61,7 +61,7 @@ FEATURE(sctp, "Stream Control Transmission Protocol");
126 +sctp_init_sysctls(void)
128 SCTP_BASE_SYSCTL(sctp_sendspace) = SCTPCTL_MAXDGRAM_DEFAULT;
129 SCTP_BASE_SYSCTL(sctp_recvspace) = SCTPCTL_RECVSPACE_DEFAULT;
130 diff --git a/usrsctplib/user_socket.c b/usrsctplib/user_socket.c
131 index 513a5a9..89e9eb2 100755
132 --- a/usrsctplib/user_socket.c
133 +++ b/usrsctplib/user_socket.c
134 @@ -2857,7 +2857,6 @@ sctp_userspace_ip_output(int *result, struct mbuf *o_pak,
141 struct sockaddr_in dst;
142 @@ -2930,16 +2929,13 @@ sctp_userspace_ip_output(int *result, struct mbuf *o_pak,
143 m_adj(m, sizeof(struct ip) + sizeof(struct udphdr));
147 for (iovcnt = 0; m != NULL && iovcnt < MAXLEN_MBUF_CHAIN; m = m->m_next, iovcnt++) {
149 send_iovec[iovcnt].iov_base = (caddr_t)m->m_data;
150 send_iovec[iovcnt].iov_len = SCTP_BUF_LEN(m);
151 - send_count += send_iovec[iovcnt].iov_len;
153 send_iovec[iovcnt].buf = (caddr_t)m->m_data;
154 send_iovec[iovcnt].len = SCTP_BUF_LEN(m);
155 - send_count += send_iovec[iovcnt].len;
159 @@ -3002,7 +2998,6 @@ void sctp_userspace_ip6_output(int *result, struct mbuf *o_pak,
166 struct sockaddr_in6 dst;
167 @@ -3076,16 +3071,13 @@ void sctp_userspace_ip6_output(int *result, struct mbuf *o_pak,
168 m_adj(m, sizeof(struct ip6_hdr));
172 for (iovcnt = 0; m != NULL && iovcnt < MAXLEN_MBUF_CHAIN; m = m->m_next, iovcnt++) {
174 send_iovec[iovcnt].iov_base = (caddr_t)m->m_data;
175 send_iovec[iovcnt].iov_len = SCTP_BUF_LEN(m);
176 - send_count += send_iovec[iovcnt].iov_len;
178 send_iovec[iovcnt].buf = (caddr_t)m->m_data;
179 send_iovec[iovcnt].len = SCTP_BUF_LEN(m);
180 - send_count += send_iovec[iovcnt].len;