aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/sctp_input.c
diff options
context:
space:
mode:
authorRandall Stewart <rrs@FreeBSD.org>2008-04-14 18:13:33 +0000
committerRandall Stewart <rrs@FreeBSD.org>2008-04-14 18:13:33 +0000
commiteadccaccf02c8d0c3901e72bb5c0226ed1ddc9e2 (patch)
tree90c89d88c4f9e845e6d3e3e7b3ebc7be1b32b9b3 /sys/netinet/sctp_input.c
parent276ca5012ced2a3f278f6fe12cce3d42b5d91609 (diff)
downloadsrc-eadccaccf02c8d0c3901e72bb5c0226ed1ddc9e2.tar.gz
src-eadccaccf02c8d0c3901e72bb5c0226ed1ddc9e2.zip
Use the pru_flush infrastructure to avoid a panic
PR: 122710 MFC after: 1 week
Notes
Notes: svn path=/head/; revision=178202
Diffstat (limited to 'sys/netinet/sctp_input.c')
-rw-r--r--sys/netinet/sctp_input.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c
index 5bad746ec355..4e57cb1760d5 100644
--- a/sys/netinet/sctp_input.c
+++ b/sys/netinet/sctp_input.c
@@ -2182,6 +2182,20 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset,
/* out of memory or ?? */
return (NULL);
}
+#ifdef SCTP_MBUF_LOGGING
+ if (sctp_logging_level & SCTP_MBUF_LOGGING_ENABLE) {
+ struct mbuf *mat;
+
+ mat = m_sig;
+ while (mat) {
+ if (SCTP_BUF_IS_EXTENDED(mat)) {
+ sctp_log_mb(mat, SCTP_MBUF_SPLIT);
+ }
+ mat = SCTP_BUF_NEXT(mat);
+ }
+ }
+#endif
+
/*
* compute the signature/digest for the cookie
*/
@@ -2795,7 +2809,7 @@ sctp_handle_shutdown_complete(struct sctp_shutdown_complete_chunk *cp,
}
}
/* stop the timer */
- sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWN, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_22);
+ sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWNACK, stcb->sctp_ep, stcb, net, SCTP_FROM_SCTP_INPUT + SCTP_LOC_22);
SCTP_STAT_INCR_COUNTER32(sctps_shutdown);
/* free the TCB */
SCTPDBG(SCTP_DEBUG_INPUT2,
@@ -4807,6 +4821,19 @@ process_control_chunks:
SCTP_BUF_NEXT(mm) = SCTP_M_COPYM(m, *offset, SCTP_SIZE32(chk_length),
M_DONTWAIT);
if (SCTP_BUF_NEXT(mm)) {
+#ifdef SCTP_MBUF_LOGGING
+ if (sctp_logging_level & SCTP_MBUF_LOGGING_ENABLE) {
+ struct mbuf *mat;
+
+ mat = SCTP_BUF_NEXT(mm);
+ while (mat) {
+ if (SCTP_BUF_IS_EXTENDED(mat)) {
+ sctp_log_mb(mat, SCTP_MBUF_ICOPY);
+ }
+ mat = SCTP_BUF_NEXT(mat);
+ }
+ }
+#endif
sctp_queue_op_err(stcb, mm);
} else {
sctp_m_freem(mm);