mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-16 21:34:10 +00:00
tcp_usr_connect: report actual error code when stack requests drop
This commit is contained in:
parent
3284f4925f
commit
1d41a49404
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue