Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
HardenedBSD
HardenedBSD
Commits
1d41a494
Commit
1d41a494
authored
Jan 13, 2022
by
Gleb Smirnoff
Browse files
tcp_usr_connect: report actual error code when stack requests drop
parent
3284f492
Changes
1
Hide whitespace changes
Inline
Side-by-side
sys/netinet/tcp_usrreq.c
View file @
1d41a494
...
...
@@ -594,8 +594,8 @@ tcp_usr_connect(struct socket *so, struct sockaddr *nam, struct thread *td)
#endif
tcp_timer_activate
(
tp
,
TT_KEEP
,
TP_KEEPINIT
(
tp
));
error
=
tcp_output
(
tp
);
KASSERT
(
error
>=
0
,
(
"TCP stack %s requested tcp_drop(%p) at connect()"
,
tp
->
t_fb
->
tfb_tcp_block_name
,
tp
));
KASSERT
(
error
>=
0
,
(
"TCP stack %s requested tcp_drop(%p) at connect()"
", error code %d"
,
tp
->
t_fb
->
tfb_tcp_block_name
,
tp
,
-
error
));
out_in_epoch:
NET_EPOCH_EXIT
(
et
);
out:
...
...
@@ -722,8 +722,8 @@ tcp6_usr_connect(struct socket *so, struct sockaddr *nam, struct thread *td)
#endif
NET_EPOCH_EXIT
(
et
);
out:
KASSERT
(
error
>=
0
,
(
"TCP stack %s requested tcp_drop(%p) at connect()"
,
tp
->
t_fb
->
tfb_tcp_block_name
,
tp
));
KASSERT
(
error
>=
0
,
(
"TCP stack %s requested tcp_drop(%p) at connect()"
", error code %d"
,
tp
->
t_fb
->
tfb_tcp_block_name
,
tp
,
-
error
));
/*
* If the implicit bind in the connect call fails, restore
* the flags we modified.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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