]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Fix ipv6 tunnel endianness bug.
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 25 Jul 2007 04:43:58 +0000 (21:43 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Aug 2007 21:27:29 +0000 (14:27 -0700)
[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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/ipv6/ip6_tunnel.c

index a0902fbdb4e1ebfa71ee3f4f4d349b0735e923e2..31f92525799b6011c6af0aa6d9151b07db5cb742 100644 (file)
@@ -962,8 +962,8 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
        dsfield = ipv4_get_dsfield(iph);
 
        if ((t->parms.flags & IP6_TNL_F_USE_ORIG_TCLASS))
-               fl.fl6_flowlabel |= ntohl(((__u32)iph->tos << IPV6_TCLASS_SHIFT)
-                                         & IPV6_TCLASS_MASK);
+               fl.fl6_flowlabel |= htonl((__u32)iph->tos << IPV6_TCLASS_SHIFT)
+                                         & IPV6_TCLASS_MASK;
 
        err = ip6_tnl_xmit2(skb, dev, dsfield, &fl, encap_limit, &mtu);
        if (err != 0) {