diff options
| -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 @@ | |||
| 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> |
| @@ -1667,7 +1668,7 @@ static u16 simple_tx_hash(struct net_device *dev, struct sk_buff *skb) | |||
| 1667 | { | 1668 | { |
| 1668 | u32 addr1, addr2, ports; | 1669 | u32 addr1, addr2, ports; |
| 1669 | u32 hash, ihl; | 1670 | u32 hash, ihl; |
| 1670 | u8 ip_proto; | 1671 | u8 ip_proto = 0; |
| 1671 | 1672 | ||
| 1672 | if (unlikely(!simple_tx_hashrnd_initialized)) { | 1673 | if (unlikely(!simple_tx_hashrnd_initialized)) { |
| 1673 | get_random_bytes(&simple_tx_hashrnd, 4); | 1674 | get_random_bytes(&simple_tx_hashrnd, 4); |
| @@ -1676,7 +1677,8 @@ static u16 simple_tx_hash(struct net_device *dev, struct sk_buff *skb) | |||
| 1676 | 1677 | ||
| 1677 | switch (skb->protocol) { | 1678 | switch (skb->protocol) { |
| 1678 | case __constant_htons(ETH_P_IP): | 1679 | case __constant_htons(ETH_P_IP): |
| 1679 | ip_proto = ip_hdr(skb)->protocol; | 1680 | if (!(ip_hdr(skb)->frag_off & htons(IP_MF | IP_OFFSET))) |
| 1681 | ip_proto = ip_hdr(skb)->protocol; | ||
| 1680 | addr1 = ip_hdr(skb)->saddr; | 1682 | addr1 = ip_hdr(skb)->saddr; |
| 1681 | addr2 = ip_hdr(skb)->daddr; | 1683 | addr2 = ip_hdr(skb)->daddr; |
| 1682 | ihl = ip_hdr(skb)->ihl; | 1684 | ihl = ip_hdr(skb)->ihl; |
