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: <1385659745.5352.23.camel@edumazet-glaptop2.roam.corp.google.com>
Date:	Thu, 28 Nov 2013 09:29:05 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Paul Durrant <paul.durrant@...rix.com>
Cc:	xen-devel@...ts.xen.org, netdev@...r.kernel.org,
	Wei Liu <wei.liu2@...rix.com>,
	Ian Campbell <ian.campbell@...rix.com>,
	David Vrabel <david.vrabel@...rix.com>
Subject: Re: [PATCH net v2] xen-netback: fix fragment detection in checksum
 setup

On Thu, 2013-11-28 at 13:23 +0000, Paul Durrant wrote:
> The code to detect fragments in checksum_setup() was missing for IPv4 and
> too eager for IPv6. (It transpires that Windows seems to send IPv6 packets
> with a fragment header even if they are not a fragment - i.e. offset is zero,
> and M bit is not set).

> +	/* 3fff -> fragment offset != 0 OR more fragments */
> +	if (ntohs(iph->frag_off) & 0x3fff)
> +		fragment = true;
> +

What about the more self documented and faster :

if (iph->frag_off & htons(IP_OFFSET | IP_MF))
	fragment = true;



--
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