git: e21c668719a6 - main - tcp: pass positive errno to tcp_drop()

From: Gleb Smirnoff <glebius_at_FreeBSD.org>
Date: Tue, 23 Jan 2024 21:00:03 UTC
The branch main has been updated by glebius:

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

commit e21c668719a65e119fe916f6bd22a05f33f6e315
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2024-01-23 20:52:55 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2024-01-23 20:59:21 +0000

    tcp: pass positive errno to tcp_drop()
    
    Fixes:  446ccdd08e2a9f704f6348cd7f679e59183b99b3
---
 sys/netinet/tcp_timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c
index 125e28134c01..f0eb3bad33cf 100644
--- a/sys/netinet/tcp_timer.c
+++ b/sys/netinet/tcp_timer.c
@@ -299,7 +299,7 @@ tcp_output_locked(struct tcpcb *tp)
 		KASSERT(tp->t_fb->tfb_flags & TCP_FUNC_OUTPUT_CANDROP,
 		    ("TCP stack %s requested tcp_drop(%p)",
 		    tp->t_fb->tfb_tcp_block_name, tp));
-		tp = tcp_drop(tp, rv);
+		tp = tcp_drop(tp, -rv);
 	}
 
 	return (tp != NULL);