summaryrefslogtreecommitdiff
path: root/sys/netinet/sctputil.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/sctputil.c')
-rw-r--r--sys/netinet/sctputil.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c
index 19cb06677dc5..09a0e20e0301 100644
--- a/sys/netinet/sctputil.c
+++ b/sys/netinet/sctputil.c
@@ -3962,6 +3962,9 @@ sctp_handle_ootb(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh,
break;
}
switch (ch->chunk_type) {
+ case SCTP_COOKIE_ECHO:
+ /* We hit here only if the assoc is being freed */
+ return;
case SCTP_PACKET_DROPPED:
/* we don't respond to pkt-dropped */
return;
@@ -5265,10 +5268,16 @@ found_one:
* to increment, we need to use the atomic add to
* the refcnt
*/
- if (freecnt_applied)
+ if (freecnt_applied) {
+#ifdef INVARIANTS
panic("refcnt already incremented");
- atomic_add_int(&stcb->asoc.refcnt, 1);
- freecnt_applied = 1;
+#else
+ printf("refcnt already incremented?\n");
+#endif
+ } else {
+ atomic_add_int(&stcb->asoc.refcnt, 1);
+ freecnt_applied = 1;
+ }
/*
* Setup to remember how much we have not yet told
* the peer our rwnd has opened up. Note we grab the