aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xusrsctplib/netinet/sctp_input.c6
-rwxr-xr-xusrsctplib/netinet/sctp_output.c17
-rwxr-xr-xusrsctplib/netinet/sctp_output.h4
-rwxr-xr-xusrsctplib/netinet/sctp_usrreq.c5
-rw-r--r--usrsctplib/netinet6/sctp6_usrreq.c7
5 files changed, 21 insertions, 18 deletions
diff --git a/usrsctplib/netinet/sctp_input.c b/usrsctplib/netinet/sctp_input.c
index ebbe1e59..56b7420d 100755
--- a/usrsctplib/netinet/sctp_input.c
+++ b/usrsctplib/netinet/sctp_input.c
@@ -32,7 +32,7 @@
#ifdef __FreeBSD__
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/netinet/sctp_input.c 285792 2015-07-22 11:30:37Z rrs $");
+__FBSDID("$FreeBSD: head/sys/netinet/sctp_input.c 285838 2015-07-24 14:13:43Z rrs $");
#endif
#include <netinet/sctp_os.h>
@@ -3891,7 +3891,7 @@ sctp_handle_stream_reset_response(struct sctp_tcb *stcb,
}
}
if (asoc->stream_reset_outstanding == 0) {
- sctp_send_stream_reset_out_if_possible(stcb);
+ sctp_send_stream_reset_out_if_possible(stcb, SCTP_SO_NOT_LOCKED);
}
return (0);
}
@@ -3959,7 +3959,7 @@ sctp_handle_str_reset_request_in(struct sctp_tcb *stcb,
} else {
sctp_add_stream_reset_result(chk, seq, SCTP_STREAM_RESET_RESULT_ERR_BAD_SEQNO);
}
- sctp_send_stream_reset_out_if_possible(stcb);
+ sctp_send_stream_reset_out_if_possible(stcb, SCTP_SO_NOT_LOCKED);
}
static int
diff --git a/usrsctplib/netinet/sctp_output.c b/usrsctplib/netinet/sctp_output.c
index 0ebd0542..683477dd 100755
--- a/usrsctplib/netinet/sctp_output.c
+++ b/usrsctplib/netinet/sctp_output.c
@@ -32,7 +32,7 @@
#ifdef __FreeBSD__
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.c 285792 2015-07-22 11:30:37Z rrs $");
+__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.c 285837 2015-07-24 14:09:03Z rrs $");
#endif
#include <netinet/sctp_os.h>
@@ -10560,7 +10560,7 @@ do_it_again:
sctp_fix_ecn_echo(asoc);
if (stcb->asoc.trigger_reset) {
- if (sctp_send_stream_reset_out_if_possible(stcb) == 0) {
+ if (sctp_send_stream_reset_out_if_possible(stcb, so_locked) == 0) {
goto do_it_again;
}
}
@@ -12490,7 +12490,7 @@ sctp_add_an_in_stream(struct sctp_tmit_chunk *chk,
}
int
-sctp_send_stream_reset_out_if_possible(struct sctp_tcb *stcb)
+sctp_send_stream_reset_out_if_possible(struct sctp_tcb *stcb, int so_locked)
{
struct sctp_association *asoc;
struct sctp_tmit_chunk *chk;
@@ -12516,7 +12516,7 @@ sctp_send_stream_reset_out_if_possible(struct sctp_tcb *stcb)
chk->book_size_scale = 0;
chk->data = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_NOWAIT, 1, MT_DATA);
if (chk->data == NULL) {
- sctp_free_a_chunk(stcb, chk, SCTP_SO_LOCKED);
+ sctp_free_a_chunk(stcb, chk, so_locked);
SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTP_OUTPUT, ENOMEM);
return (ENOMEM);
}
@@ -12543,7 +12543,7 @@ sctp_send_stream_reset_out_if_possible(struct sctp_tcb *stcb)
} else {
m_freem(chk->data);
chk->data = NULL;
- sctp_free_a_chunk(stcb, chk, SCTP_SO_LOCKED);
+ sctp_free_a_chunk(stcb, chk, so_locked);
return(ENOENT);
}
asoc->str_reset = chk;
@@ -12552,6 +12552,10 @@ sctp_send_stream_reset_out_if_possible(struct sctp_tcb *stcb)
chk,
sctp_next);
asoc->ctrl_queue_cnt++;
+
+ if (stcb->asoc.send_sack) {
+ sctp_send_sack(stcb, so_locked);
+ }
sctp_timer_start(SCTP_TIMER_TYPE_STRRESET, stcb->sctp_ep, stcb, chk->whoTo);
return(0);
}
@@ -12747,6 +12751,9 @@ skip_stuff:
chk,
sctp_next);
asoc->ctrl_queue_cnt++;
+ if (stcb->asoc.send_sack) {
+ sctp_send_sack(stcb, SCTP_SO_LOCKED);
+ }
sctp_timer_start(SCTP_TIMER_TYPE_STRRESET, stcb->sctp_ep, stcb, chk->whoTo);
return (0);
}
diff --git a/usrsctplib/netinet/sctp_output.h b/usrsctplib/netinet/sctp_output.h
index 57ce642c..f2d42483 100755
--- a/usrsctplib/netinet/sctp_output.h
+++ b/usrsctplib/netinet/sctp_output.h
@@ -32,7 +32,7 @@
#ifdef __FreeBSD__
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.h 285792 2015-07-22 11:30:37Z rrs $");
+__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.h 285837 2015-07-24 14:09:03Z rrs $");
#endif
#ifndef _NETINET_SCTP_OUTPUT_H_
@@ -208,7 +208,7 @@ void
sctp_add_stream_reset_result_tsn(struct sctp_tmit_chunk *,
uint32_t, uint32_t, uint32_t, uint32_t);
int
-sctp_send_stream_reset_out_if_possible(struct sctp_tcb *);
+sctp_send_stream_reset_out_if_possible(struct sctp_tcb *, int);
int
sctp_send_str_reset_req(struct sctp_tcb *, uint16_t , uint16_t *,
diff --git a/usrsctplib/netinet/sctp_usrreq.c b/usrsctplib/netinet/sctp_usrreq.c
index f66ad9db..1edd5f16 100755
--- a/usrsctplib/netinet/sctp_usrreq.c
+++ b/usrsctplib/netinet/sctp_usrreq.c
@@ -32,7 +32,7 @@
#ifdef __FreeBSD__
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/netinet/sctp_usrreq.c 285792 2015-07-22 11:30:37Z rrs $");
+__FBSDID("$FreeBSD: head/sys/netinet/sctp_usrreq.c 285837 2015-07-24 14:09:03Z rrs $");
#endif
#include <netinet/sctp_os.h>
@@ -5496,8 +5496,7 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
strrst->srs_stream_list,
send_in, 0, 0, 0, 0, 0);
} else
- error = sctp_send_stream_reset_out_if_possible(stcb);
-
+ error = sctp_send_stream_reset_out_if_possible(stcb, SCTP_SO_LOCKED);
if (!error)
sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_STRRST_REQ, SCTP_SO_LOCKED);
diff --git a/usrsctplib/netinet6/sctp6_usrreq.c b/usrsctplib/netinet6/sctp6_usrreq.c
index 493ed45e..5aa49ed2 100644
--- a/usrsctplib/netinet6/sctp6_usrreq.c
+++ b/usrsctplib/netinet6/sctp6_usrreq.c
@@ -32,7 +32,7 @@
#ifdef __FreeBSD__
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/netinet6/sctp6_usrreq.c 284515 2015-06-17 15:20:14Z tuexen $");
+__FBSDID("$FreeBSD: head/sys/netinet6/sctp6_usrreq.c 285877 2015-07-25 18:26:09Z tuexen $");
#endif
#include <netinet/sctp_os.h>
@@ -43,9 +43,7 @@ __FBSDID("$FreeBSD: head/sys/netinet6/sctp6_usrreq.c 284515 2015-06-17 15:20:14Z
#include <netinet/sctp_pcb.h>
#include <netinet/sctp_header.h>
#include <netinet/sctp_var.h>
-#ifdef INET6
#include <netinet6/sctp6_var.h>
-#endif
#include <netinet/sctp_sysctl.h>
#include <netinet/sctp_output.h>
#include <netinet/sctp_uio.h>
@@ -59,6 +57,7 @@ __FBSDID("$FreeBSD: head/sys/netinet6/sctp6_usrreq.c 284515 2015-06-17 15:20:14Z
#include <netinet/sctp_bsd_addr.h>
#include <netinet/sctp_crc32.h>
#if !defined(__Userspace_os_Windows)
+#include <netinet/icmp6.h>
#include <netinet/udp.h>
#endif
@@ -67,9 +66,7 @@ __FBSDID("$FreeBSD: head/sys/netinet6/sctp6_usrreq.c 284515 2015-06-17 15:20:14Z
#endif
#ifdef IPSEC
#include <netipsec/ipsec.h>
-#ifdef INET6
#include <netipsec/ipsec6.h>
-#endif /* INET6 */
#endif /* IPSEC */
#if !defined(__Userspace__)