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: <1430179812.22254.240.camel@edumazet-glaptop2.roam.corp.google.com>
Date:	Mon, 27 Apr 2015 17:10:12 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Thomas Falcon <tlfalcon@...ux.vnet.ibm.com>
Cc:	netdev@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
	nfont@...ux.vnet.ibm.com, Brian King <brking@...ux.vnet.ibm.com>
Subject: Re: [PATCH net-next v2 4/4] ibmveth: Add support for Large Receive
 Offload

On Mon, 2015-04-27 at 17:10 -0500, Thomas Falcon wrote:




> +				if (be16_to_cpu(skb->protocol) == ETH_P_IP) {
> +					skb_set_network_header(skb, 0);
> +					skb_set_transport_header(skb, sizeof(struct iphdr));
> +					iph = ip_hdr(skb);
> +

All this should really be :

if (skb->protocol == htons(ETH_P_IP)) {
	iph = (struct iphdr *)skb->data;

Because setting network header and a (potentially wrong) transport
header is confusing at this stage.

(It should be done later in core networking stack)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ