The branch main has been updated by glebius:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=1d41a4940463429ec68e8baf9edf2ce98a5938c9

commit 1d41a4940463429ec68e8baf9edf2ce98a5938c9
Author:     Gleb Smirnoff <[email protected]>
AuthorDate: 2022-01-13 18:32:41 +0000
Commit:     Gleb Smirnoff <[email protected]>
CommitDate: 2022-01-13 18:32:41 +0000

    tcp_usr_connect: report actual error code when stack requests drop
---
 sys/netinet/tcp_usrreq.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index def7d477c72b..f409970d7ebf 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -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 @@ out_in_epoch:
 #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.

Reply via email to