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] [day] [month] [year] [list]
Date: Fri, 23 Feb 2024 02:11:18 +0800
From: Jason Xing <kerneljasonxing@...il.com>
To: David Ahern <dsahern@...nel.org>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org, 
	pabeni@...hat.com, kuniyu@...zon.com, 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 Fri, Feb 23, 2024 at 1:28 AM David Ahern <dsahern@...nel.org> wrote:
>
> 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.

Maybe the way I use the checkpatch script is not right...

>
>                         if (!reason)
>                                 return SKB_DROP_REASON_TCP_OLD_ACK;
>
>                         return -reason;
>
>

Thanks, I will update it.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ