Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
HardenedBSD
HardenedBSD
Commits
12ae3476
Commit
12ae3476
authored
Dec 02, 2021
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
sys/netinet/tcp_subr.c
View file @
12ae3476
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment