lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 23 Mar 2022 21:05:07 +0800
From:   Jianguo Wu <wujianguo106@....com>
To:     menglong8.dong@...il.com, dsahern@...nel.org,
        Jakub Kicinski <kuba@...nel.org>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        edumazet@...gle.com
Subject: [PATCH net-next] tcp: consume packet after do time wait process

From: Jianguo Wu <wujianguo@...natelecom.cn>

Using consume_skb() instead of kfree_skb_reason() after do normally
time wait process to be drop monitor friendly.

Signed-off-by: Jianguo Wu <wujianguo@...natelecom.cn>
---
 net/ipv4/tcp_ipv4.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index f9cec62..957d86c 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -2154,7 +2154,9 @@ int tcp_v4_rcv(struct sk_buff *skb)
 		goto discard_it;
 	case TCP_TW_SUCCESS:;
 	}
-	goto discard_it;
+
+	consume_skb(skb);
+	return 0;
 }

 static struct timewait_sock_ops tcp_timewait_sock_ops = {
-- 
1.8.3.1

Powered by blists - more mailing lists