mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-06 16:40:47 +00:00
tcp_drain(): initialize the inpcb iterator when curvnet is set
Reported by: cy
Pointy hat to: glebius
Fixes: de2d47842e
This commit is contained in:
parent
651a545143
commit
12ae3476f3
|
@ -2613,8 +2613,6 @@ tcp_close(struct tcpcb *tp)
|
|||
void
|
||||
tcp_drain(void)
|
||||
{
|
||||
struct inpcb_iterator inpi = INP_ALL_ITERATOR(&V_tcbinfo,
|
||||
INPLOOKUP_WLOCKPCB);
|
||||
VNET_ITERATOR_DECL(vnet_iter);
|
||||
|
||||
if (!do_tcpdrain)
|
||||
|
@ -2623,6 +2621,8 @@ tcp_drain(void)
|
|||
VNET_LIST_RLOCK_NOSLEEP();
|
||||
VNET_FOREACH(vnet_iter) {
|
||||
CURVNET_SET(vnet_iter);
|
||||
struct inpcb_iterator inpi = INP_ALL_ITERATOR(&V_tcbinfo,
|
||||
INPLOOKUP_WLOCKPCB);
|
||||
struct inpcb *inpb;
|
||||
struct tcpcb *tcpb;
|
||||
|
||||
|
|
Loading…
Reference in a new issue