diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-09-22 07:45:06 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-09-22 07:45:06 -0700 |
commit | 18f22fbb8ba5570a5ea3d531bc4ec65cf211f11b (patch) | |
tree | be8665fca14508ebb88bd38bfa0ca9baece6f018 /net | |
parent | 72d31053f62c4bc464c2783974926969614a8649 (diff) | |
parent | ad55dcaff0e34269f86975ce2ea0da22e9eb74a1 (diff) | |
download | linux-stable-18f22fbb8ba5570a5ea3d531bc4ec65cf211f11b.tar.gz linux-stable-18f22fbb8ba5570a5ea3d531bc4ec65cf211f11b.tar.bz2 linux-stable-18f22fbb8ba5570a5ea3d531bc4ec65cf211f11b.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
netdev: simple_tx_hash shouldn't hash inside fragments
Diffstat (limited to 'net')
-rw-r--r-- | net/core/dev.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index e719ed29310f..e8eb2b478344 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -122,6 +122,7 @@ #include <linux/if_arp.h> #include <linux/if_vlan.h> #include <linux/ip.h> +#include <net/ip.h> #include <linux/ipv6.h> #include <linux/in.h> #include <linux/jhash.h> @@ -1667,7 +1668,7 @@ static u16 simple_tx_hash(struct net_device *dev, struct sk_buff *skb) { u32 addr1, addr2, ports; u32 hash, ihl; - u8 ip_proto; + u8 ip_proto = 0; if (unlikely(!simple_tx_hashrnd_initialized)) { get_random_bytes(&simple_tx_hashrnd, 4); @@ -1676,7 +1677,8 @@ static u16 simple_tx_hash(struct net_device *dev, struct sk_buff *skb) switch (skb->protocol) { case __constant_htons(ETH_P_IP): - ip_proto = ip_hdr(skb)->protocol; + if (!(ip_hdr(skb)->frag_off & htons(IP_MF | IP_OFFSET))) + ip_proto = ip_hdr(skb)->protocol; addr1 = ip_hdr(skb)->saddr; addr2 = ip_hdr(skb)->daddr; ihl = ip_hdr(skb)->ihl; |