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]
Message-ID: <20210126125027.GX3576117@gauss3.secunet.de>
Date:   Tue, 26 Jan 2021 13:50:27 +0100
From:   Steffen Klassert <steffen.klassert@...unet.com>
To:     Dongseok Yi <dseok.yi@...sung.com>
CC:     "'David S. Miller'" <davem@...emloft.net>,
        'Alexander Lobakin' <alobakin@...me>,
        <namkyu78.kim@...sung.com>, 'Jakub Kicinski' <kuba@...nel.org>,
        'Hideaki YOSHIFUJI' <yoshfuji@...ux-ipv6.org>,
        "'Willem de Bruijn'" <willemb@...gle.com>,
        <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net v3] udp: ipv4: manipulate network header of NATed UDP
 GRO fraglist

On Tue, Jan 26, 2021 at 09:31:29AM +0900, Dongseok Yi wrote:
> On 1/25/21 9:45 PM, Steffen Klassert wrote:
> > On Thu, Jan 21, 2021 at 10:24:39PM +0900, Dongseok Yi wrote:
> > >
> > > +static void __udpv4_gso_segment_csum(struct sk_buff *seg,
> > > +				     __be32 *oldip, __be32 *newip,
> > > +				     __be16 *oldport, __be16 *newport)
> > > +{
> > > +	struct udphdr *uh;
> > > +	struct iphdr *iph;
> > > +
> > > +	if (*oldip == *newip && *oldport == *newport)
> > > +		return;
> > 
> > This check is redundant as you check this already in
> > __udpv4_gso_segment_list_csum.
> 
> When comes in __udpv4_gso_segment_csum, the condition would be
> SNAT or DNAT. I think we don't need to do the function if the
> condition is not met. I want to skip the function for SNAT checksum
> when DNAT only case. Is it better to remove the check?

Ok, so it can be seen as an optimization. It is ok as it is.

Acked-by: Steffen Klassert <steffen.klassert@...unet.com>

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ