mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-16 21:34:10 +00:00
Fix handling of sctp_drain().
Approved by: rrs (mentor) MFC after: 2 month
This commit is contained in:
parent
2c19e7fa86
commit
4b6492f5ab
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=197342
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue