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: <CAM_iQpVFWStL2KazKSufohmGeGfyEAptBqQO7x9Hpi_w6Mygig@mail.gmail.com>
Date:   Tue, 27 Nov 2018 15:23:50 -0800
From:   Cong Wang <xiyou.wangcong@...il.com>
To:     Linux Kernel Network Developers <netdev@...r.kernel.org>
Cc:     Saeed Mahameed <saeedm@...lanox.com>,
        Eric Dumazet <edumazet@...gle.com>
Subject: Re: [Patch net] mlx5: fixup checksum for ethernet padding

On Tue, Nov 27, 2018 at 3:21 PM Cong Wang <xiyou.wangcong@...il.com> wrote:
> +       if (proto == htons(ETH_P_IP)) {
> +               struct iphdr *ipv4 = ip_p;
> +
> +               pad_offset =  network_depth + be16_to_cpu(ipv4->tot_len);
> +       } else if (proto == htons(ETH_P_IPV6)) {
> +               struct ipv6hdr *ipv6 = ip_p;
> +
> +               pad_offset = network_depth + sizeof(struct ipv6hdr) +
> +                            be16_to_cpu(ipv6->payload_len);
> +       }
> +

Should return here for other protocols... Will fix this in v2.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ