ipv6: Call skb_get_hash_flowi6 to get skb->hash in ip6_make_flowlabel

We can't call skb_get_hash here since the packet is not complete to do
flow_dissector. Create hash based on flowi6 instead.

Signed-off-by: Tom Herbert <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Tom Herbert
2015-07-31 16:52:11 -07:00
committed by David S. Miller
parent f70ea018da
commit 67800f9b1f
4 changed files with 9 additions and 7 deletions

View File

@@ -708,12 +708,13 @@ static inline void iph_to_flow_copy_v6addrs(struct flow_keys *flow,
#if IS_ENABLED(CONFIG_IPV6)
static inline __be32 ip6_make_flowlabel(struct net *net, struct sk_buff *skb,
__be32 flowlabel, bool autolabel)
__be32 flowlabel, bool autolabel,
struct flowi6 *fl6)
{
if (!flowlabel && (autolabel || net->ipv6.sysctl.auto_flowlabels)) {
u32 hash;
hash = skb_get_hash(skb);
hash = skb_get_hash_flowi6(skb, fl6);
/* Since this is being sent on the wire obfuscate hash a bit
* to minimize possbility that any useful information to an