aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2010-12-12 20:50:44 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2010-12-12 20:50:44 +0000
commit0271d0cd1385e5e32fcadfe6ced2dbb181f2ddc2 (patch)
tree2c280ac118f42a9453b31e9445c6ed083c1a2af8 /sys
parent63f6e7ba5683ed746f41f860cb7578b558a881dc (diff)
downloadsrc-0271d0cd1385e5e32fcadfe6ced2dbb181f2ddc2.tar.gz
src-0271d0cd1385e5e32fcadfe6ced2dbb181f2ddc2.zip
Bugfix: Do correct accounting using the MIB counters when an
association is aborted via sctp_abort_association(). MFC after: 3 days.
Notes
Notes: svn path=/head/; revision=216397
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/sctputil.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c
index 707d05cd37bd..975acb86f3a5 100644
--- a/sys/netinet/sctputil.c
+++ b/sys/netinet/sctputil.c
@@ -3847,6 +3847,11 @@ sctp_abort_association(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
SCTP_TCB_LOCK(stcb);
atomic_subtract_int(&stcb->asoc.refcnt, 1);
#endif
+ SCTP_STAT_INCR_COUNTER32(sctps_aborted);
+ if ((SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) ||
+ (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) {
+ SCTP_STAT_DECR_GAUGE32(sctps_currestab);
+ }
(void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_4);
#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
SCTP_SOCKET_UNLOCK(so, 1);