aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@fh-muenster.de>2020-03-20 00:13:54 +0100
committerMichael Tuexen <tuexen@fh-muenster.de>2020-03-20 00:13:54 +0100
commitd9698aadd4d1f8899fa788014af55807ba1d3b98 (patch)
treef546aace4ae35009a5320ada5bfa067327b11834
parentd07a5f27630b1250655337791adf2a4c171a6712 (diff)
downloadusrsctp-d9698aadd4d1f8899fa788014af55807ba1d3b98.tar.gz
Fix a NET_EPOCH bug.
-rwxr-xr-xusrsctplib/netinet/sctp_output.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/usrsctplib/netinet/sctp_output.c b/usrsctplib/netinet/sctp_output.c
index fee6ae5c..6b8566fd 100755
--- a/usrsctplib/netinet/sctp_output.c
+++ b/usrsctplib/netinet/sctp_output.c
@@ -34,7 +34,7 @@
#ifdef __FreeBSD__
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.c 359152 2020-03-19 21:01:16Z tuexen $");
+__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.c 359156 2020-03-19 23:07:52Z tuexen $");
#endif
#include <netinet/sctp_os.h>
@@ -14128,7 +14128,7 @@ sctp_lower_sosend(struct socket *so,
#endif
sctp_abort_an_association(stcb->sctp_ep, stcb, mm, SCTP_SO_LOCKED);
#if defined(__FreeBSD__)
- NET_EPOCH_EXIT(et);
+ NET_EPOCH_EXIT(et);
#endif
/* now relock the stcb so everything is sane */
hold_tcblock = 0;
@@ -14757,12 +14757,12 @@ dataless_eof:
op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code),
msg);
#if defined(__FreeBSD__)
- NET_EPOCH_ENTER(et);
+ NET_EPOCH_ENTER(et);
#endif
sctp_abort_an_association(stcb->sctp_ep, stcb,
op_err, SCTP_SO_LOCKED);
#if defined(__FreeBSD__)
- NET_EPOCH_EXIT(et);
+ NET_EPOCH_EXIT(et);
#endif
/* now relock the stcb so everything is sane */
hold_tcblock = 0;
@@ -14788,7 +14788,13 @@ skip_out_eof:
/* a collision took us forward? */
queue_only = 0;
} else {
+#if defined(__FreeBSD__)
+ NET_EPOCH_ENTER(et);
+#endif
sctp_send_initiate(inp, stcb, SCTP_SO_LOCKED);
+#if defined(__FreeBSD__)
+ NET_EPOCH_EXIT(et);
+#endif
SCTP_SET_STATE(stcb, SCTP_STATE_COOKIE_WAIT);
queue_only = 1;
}