Commit 1d41a494 authored by Gleb Smirnoff's avatar Gleb Smirnoff
Browse files

tcp_usr_connect: report actual error code when stack requests drop

parent 3284f492
......@@ -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.
......
Supports Markdown
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