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]
Date:	Sun, 26 Jan 2014 22:42:45 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	fw@...len.de
Cc:	netdev@...r.kernel.org, eric.dumazet@...il.com
Subject: Re: [PATCH V2 2/2] net: ip, ipv6: handle gso skbs in forwarding
 path

From: Florian Westphal <fw@...len.de>
Date: Sun, 26 Jan 2014 10:58:17 +0100

> +static bool ip_exceeds_mtu(const struct sk_buff *skb, unsigned int mtu)
> +{
> +	unsigned len;
> +
> +	if (skb->len <= mtu || skb->local_df)
> +		return false;
> +
> +	if (skb_is_gso(skb) && skb_gso_network_seglen(skb) <= mtu)
> +		return false;
> +
> +	return true;
> +}

Unused local variable 'len'.  Please scan the compiler output for at
least the *.c files you touch, it warns about this case.  Also, you
should always explicitly use "unsigned int" as the type instead of
just plain "unsigned".

> @@ -88,8 +147,7 @@ int ip_forward(struct sk_buff *skb)
>  	if (opt->is_strictroute && rt->rt_uses_gateway)
>  		goto sr_failed;
>  
> -	if (unlikely(skb->len > dst_mtu(&rt->dst) && !skb_is_gso(skb) &&
> -		     (ip_hdr(skb)->frag_off & htons(IP_DF))) && !skb->local_df) {
> +	if (!ip_may_fragment(skb) && ip_exceeds_mtu(skb, dst_mtu(&rt->dst))) {
>  		IP_INC_STATS(dev_net(rt->dst.dev), IPSTATS_MIB_FRAGFAILS);
>  		icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED,
>  			  htonl(dst_mtu(&rt->dst)));

This hunk rejects, the test here looks a lot different in the current
tree.
--
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