mirror of https://gitee.com/openkylin/linux.git
[IPV6]: endianness bug in ip6_tunnel
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
43a415138d
commit
b77f2fa629
|
@ -962,8 +962,8 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||||
dsfield = ipv4_get_dsfield(iph);
|
dsfield = ipv4_get_dsfield(iph);
|
||||||
|
|
||||||
if ((t->parms.flags & IP6_TNL_F_USE_ORIG_TCLASS))
|
if ((t->parms.flags & IP6_TNL_F_USE_ORIG_TCLASS))
|
||||||
fl.fl6_flowlabel |= ntohl(((__u32)iph->tos << IPV6_TCLASS_SHIFT)
|
fl.fl6_flowlabel |= htonl((__u32)iph->tos << IPV6_TCLASS_SHIFT)
|
||||||
& IPV6_TCLASS_MASK);
|
& IPV6_TCLASS_MASK;
|
||||||
|
|
||||||
err = ip6_tnl_xmit2(skb, dev, dsfield, &fl, encap_limit, &mtu);
|
err = ip6_tnl_xmit2(skb, dev, dsfield, &fl, encap_limit, &mtu);
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
|
|
Loading…
Reference in New Issue