summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2009-09-19 14:18:42 +0000
committertuexen <tuexen@FreeBSD.org>2009-09-19 14:18:42 +0000
commit9fa52644a0a029cdc49418f53eefb04af6aea601 (patch)
treedd261e4578b455e04ae926578fdb6bcd35dca368 /sys/netinet
parentde3c71bd61d49aee290e55fe5415716bde0ec4f5 (diff)
downloadFreeBSD-src-9fa52644a0a029cdc49418f53eefb04af6aea601.zip
FreeBSD-src-9fa52644a0a029cdc49418f53eefb04af6aea601.tar.gz
Fix the disabling of sctp_drain().
Approved by: rrs (mentor) MFC after: 1 month.
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/sctp_pcb.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c
index a3af0fd..c2e7455 100644
--- a/sys/netinet/sctp_pcb.c
+++ b/sys/netinet/sctp_pcb.c
@@ -6422,10 +6422,6 @@ sctp_drain_mbufs(struct sctp_inpcb *inp, struct sctp_tcb *stcb)
/* We look for anything larger than the cum-ack + 1 */
- SCTP_STAT_INCR(sctps_protocol_drain_calls);
- if (SCTP_BASE_SYSCTL(sctp_do_drain) == 0) {
- return;
- }
asoc = &stcb->asoc;
if (asoc->cumulative_tsn == asoc->highest_tsn_inside_map) {
/* none we can reneg on. */
@@ -6588,9 +6584,12 @@ sctp_drain()
* is LOW on MBUF's and needs help. This is where reneging will
* occur. We really hope this does NOT happen!
*/
-
VNET_ITERATOR_DECL(vnet_iter);
+ SCTP_STAT_INCR(sctps_protocol_drain_calls);
+ if (SCTP_BASE_SYSCTL(sctp_do_drain) == 0) {
+ return;
+ }
VNET_LIST_RLOCK_NOSLEEP();
VNET_FOREACH(vnet_iter) {
CURVNET_SET(vnet_iter);
OpenPOWER on IntegriCloud