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>] [day] [month] [year] [list]
Message-ID: <CAF=yD-KS-F_=VytzF2WdNeQ7K7=nezoB3bWdgkUpEdfDM_weDg@mail.gmail.com>
Date:   Wed, 17 Mar 2021 09:18:23 -0400
From:   Willem de Bruijn <willemdebruijn.kernel@...il.com>
To:     Ishaan Gandhi <ishaangandhi@...il.com>
Cc:     David Miller <davem@...emloft.net>,
        Network Development <netdev@...r.kernel.org>,
        Ron Bonica <rbonica@...iper.net>
Subject: Re: [PATCH v2] icmp: support rfc5837

> +       if (ip_version != 4 && ip_version != 6) {
> +               pr_debug("ip_version must be 4 or 6\n");
> +               return;
> +       }
>
>
> always true
>
>
> I should remove this check, then?
>
> What is the standard way to differentiate IPV4 vs v6 paths in network code?
> Is there an enum with IPV4 and IPV6 options that might be used instead?

My point was that there is no need to check against an unexpected input,
as this patch introduces the only two callers. The use of ip_version itself
is fine.

I did consider suggesting splitting into separate icmp and icmp6 handlers,
but most code is shared.

> Thanks,
> Ishaan

Please use plain text when responding. Your message did not arrive on the list.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ