Commit 12ae3476 authored by Gleb Smirnoff's avatar Gleb Smirnoff
Browse files

tcp_drain(): initialize the inpcb iterator when curvnet is set

Reported by:	cy
Pointy hat to:	glebius
Fixes:		de2d4784
parent 651a5451
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment