Commit 3308de2b841e5f25bdc4a7208a451f52f8cff969
Committed by
David S. Miller
1 parent
82e9f105a2
Exists in
smarc-imx_3.14.28_1.0.0_ga
and in
1 other branch
ipv6: add ip6_flowlabel helper
And use it if possible. Signed-off-by: Florent Fourcot <florent.fourcot@enst-bretagne.fr> Reviewed-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 3 changed files with 7 additions and 2 deletions Side-by-side Diff
include/net/ipv6.h
net/ipv6/ip6_gre.c
... | ... | @@ -845,7 +845,7 @@ |
845 | 845 | if (t->parms.flags & IP6_TNL_F_USE_ORIG_TCLASS) |
846 | 846 | fl6.flowlabel |= (*(__be32 *) ipv6h & IPV6_TCLASS_MASK); |
847 | 847 | if (t->parms.flags & IP6_TNL_F_USE_ORIG_FLOWLABEL) |
848 | - fl6.flowlabel |= (*(__be32 *) ipv6h & IPV6_FLOWLABEL_MASK); | |
848 | + fl6.flowlabel |= ip6_flowlabel(ipv6h); | |
849 | 849 | if (t->parms.flags & IP6_TNL_F_USE_ORIG_FWMARK) |
850 | 850 | fl6.flowi6_mark = skb->mark; |
851 | 851 |
net/ipv6/ip6_tunnel.c
... | ... | @@ -1130,7 +1130,7 @@ |
1130 | 1130 | if (t->parms.flags & IP6_TNL_F_USE_ORIG_TCLASS) |
1131 | 1131 | fl6.flowlabel |= (*(__be32 *) ipv6h & IPV6_TCLASS_MASK); |
1132 | 1132 | if (t->parms.flags & IP6_TNL_F_USE_ORIG_FLOWLABEL) |
1133 | - fl6.flowlabel |= (*(__be32 *) ipv6h & IPV6_FLOWLABEL_MASK); | |
1133 | + fl6.flowlabel |= ip6_flowlabel(ipv6h); | |
1134 | 1134 | if (t->parms.flags & IP6_TNL_F_USE_ORIG_FWMARK) |
1135 | 1135 | fl6.flowi6_mark = skb->mark; |
1136 | 1136 |