diff options
Diffstat (limited to 'net/core/dev.c')
-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 2cc258b7acce..7091040e32ac 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -122,6 +122,7 @@ | |||
122 | #include <linux/if_arp.h> | 122 | #include <linux/if_arp.h> |
123 | #include <linux/if_vlan.h> | 123 | #include <linux/if_vlan.h> |
124 | #include <linux/ip.h> | 124 | #include <linux/ip.h> |
125 | #include <net/ip.h> | ||
125 | #include <linux/ipv6.h> | 126 | #include <linux/ipv6.h> |
126 | #include <linux/in.h> | 127 | #include <linux/in.h> |
127 | #include <linux/jhash.h> | 128 | #include <linux/jhash.h> |
@@ -1698,7 +1699,7 @@ static u16 simple_tx_hash(struct net_device *dev, struct sk_buff *skb) | |||
1698 | { | 1699 | { |
1699 | u32 addr1, addr2, ports; | 1700 | u32 addr1, addr2, ports; |
1700 | u32 hash, ihl; | 1701 | u32 hash, ihl; |
1701 | u8 ip_proto; | 1702 | u8 ip_proto = 0; |
1702 | 1703 | ||
1703 | if (unlikely(!simple_tx_hashrnd_initialized)) { | 1704 | if (unlikely(!simple_tx_hashrnd_initialized)) { |
1704 | get_random_bytes(&simple_tx_hashrnd, 4); | 1705 | get_random_bytes(&simple_tx_hashrnd, 4); |
@@ -1707,7 +1708,8 @@ static u16 simple_tx_hash(struct net_device *dev, struct sk_buff *skb) | |||
1707 | 1708 | ||
1708 | switch (skb->protocol) { | 1709 | switch (skb->protocol) { |
1709 | case htons(ETH_P_IP): | 1710 | case htons(ETH_P_IP): |
1710 | ip_proto = ip_hdr(skb)->protocol; | 1711 | if (!(ip_hdr(skb)->frag_off & htons(IP_MF | IP_OFFSET))) |
1712 | ip_proto = ip_hdr(skb)->protocol; | ||
1711 | addr1 = ip_hdr(skb)->saddr; | 1713 | addr1 = ip_hdr(skb)->saddr; |
1712 | addr2 = ip_hdr(skb)->daddr; | 1714 | addr2 = ip_hdr(skb)->daddr; |
1713 | ihl = ip_hdr(skb)->ihl; | 1715 | ihl = ip_hdr(skb)->ihl; |