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: <20110314.165929.232913682.davem@davemloft.net>
Date:	Mon, 14 Mar 2011 16:59:29 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	daniel.lezcano@...e.fr
Cc:	eric.dumazet@...il.com, kaber@...sh.net, nightnord@...il.com,
	netdev@...r.kernel.org
Subject: Re: [PATCH][v3] dev : fix mtu check when TSO is enabled

From: Daniel Lezcano <daniel.lezcano@...e.fr>
Date: Mon, 14 Mar 2011 21:39:50 +0100

> +	len = dev->mtu + dev->hard_header_len + VLAN_HLEN;
> +	if (skb->len < len)
> +		return true;

This is not a correct translation of the original test:

> -		     (skb->len > (dev->mtu + dev->hard_header_len + VLAN_HLEN)))) {

You need to use "<=" in your version, which currently rejects all
full sized frames. :-)

> +
> +	/* if TSO is enabled, we don't care about the length as the packet
> +	 * could be forwarded without being segmented before
> +	 */
> +	if (skb->dev && skb->dev->features & NETIF_F_TSO)
> +		return true;

I am trying to understand why you aren't simply checking also if this
is a segmented frame?  Perhaps skb_is_gso() && device has NETIF_F_TSO
set?

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