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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1282112701.2456.15.camel@edumazet-laptop>
Date:	Wed, 18 Aug 2010 08:25:01 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Changli Gao <xiaosuo@...il.com>
Cc:	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH 2/8] net: rps: skip fragment when computing rxhash

Le mercredi 18 août 2010 à 13:01 +0800, Changli Gao a écrit :
> Fragmented IP packets may have no transfer header, so when computing
> rxhash, we should skip them.
> 
> Signed-off-by: Changli Gao <xiaosuo@...il.com>
> ---
>  net/core/dev.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 3f82781..b7c5309 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -2284,7 +2284,10 @@ __u32 __skb_get_rxhash(struct sk_buff *skb)
>  			goto done;
>  
>  		ip = (struct iphdr *) skb->data + nhoff;
> -		ip_proto = ip->protocol;
> +		if (ip->frag_off & htons(IP_MF|IP_OFFSET))
> +			ip_proto = 0;
> +		else
> +			ip_proto = ip->protocol;
>  		addr1 = (__force u32) ip->saddr;
>  		addr2 = (__force u32) ip->daddr;
>  		ihl = ip->ihl;

Acked-by: Eric Dumazet <eric.dumazet@...il.com>

BTW, it is nicer to add some spaces :

	if (ip->frag_off & htons(IP_MF | IP_OFFSET))


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