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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b053dad4-5745-4b9a-af55-f5c04beb6584@kernel.org>
Date: Thu, 22 Feb 2024 10:28:28 -0700
From: David Ahern <dsahern@...nel.org>
To: Jason Xing <kerneljasonxing@...il.com>, davem@...emloft.net,
 edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com, kuniyu@...zon.com
Cc: netdev@...r.kernel.org, Jason Xing <kernelxing@...cent.com>
Subject: Re: [PATCH net-next v8 08/10] tcp: add dropreasons in
 tcp_rcv_state_process()

On 2/22/24 4:30 AM, Jason Xing wrote:
> @@ -6704,8 +6705,13 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)
>  				  FLAG_NO_CHALLENGE_ACK);
>  
>  	if ((int)reason <= 0) {
> -		if (sk->sk_state == TCP_SYN_RECV)
> -			return 1;	/* send one RST */
> +		if (sk->sk_state == TCP_SYN_RECV) {
> +			/* send one RST */
> +			if (!reason)
> +				return SKB_DROP_REASON_TCP_OLD_ACK;
> +			else
> +				return -reason;

checkpatch should be flagging this - the `else` is not needed.

			if (!reason)
				return SKB_DROP_REASON_TCP_OLD_ACK;

			return -reason;



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ