summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2009-09-20 11:33:39 +0000
committertuexen <tuexen@FreeBSD.org>2009-09-20 11:33:39 +0000
commit990095d3010293d553876c711f93d0928e2a8222 (patch)
tree2c4bf0209619193c35a25b0a1e2c58cfa694f9d2
parent0ceae3cfd15131605ab8e7ad7b10c1c048e873fa (diff)
downloadFreeBSD-src-990095d3010293d553876c711f93d0928e2a8222.zip
FreeBSD-src-990095d3010293d553876c711f93d0928e2a8222.tar.gz
Fix handling of sctp_drain().
Approved by: rrs (mentor) MFC after: 2 month
-rw-r--r--sys/netinet/sctp_pcb.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c
index c2e7455..21cd889 100644
--- a/sys/netinet/sctp_pcb.c
+++ b/sys/netinet/sctp_pcb.c
@@ -6585,17 +6585,20 @@ sctp_drain()
* 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);
struct sctp_inpcb *inp;
struct sctp_tcb *stcb;
+ SCTP_STAT_INCR(sctps_protocol_drain_calls);
+ if (SCTP_BASE_SYSCTL(sctp_do_drain) == 0) {
+#ifdef VIMAGE
+ continue;
+#else
+ return;
+#endif
+ }
SCTP_INP_INFO_RLOCK();
LIST_FOREACH(inp, &SCTP_BASE_INFO(listhead), sctp_list) {
/* For each endpoint */
OpenPOWER on IntegriCloud