summaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_output.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-08 00:25:17 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-02 21:21:21 -0800
commit90bcaf7b4a33bb9b100cc06869f0c033a870d4a0 (patch)
treefb8307b99fd9779d17fdfb0c35d836a8438d424a /net/ipv6/ip6_output.c
parent92d9ece7af9c84bfbd1ff640926fac5b573a09f7 (diff)
downloadlinux-90bcaf7b4a33bb9b100cc06869f0c033a870d4a0.tar.gz
linux-90bcaf7b4a33bb9b100cc06869f0c033a870d4a0.tar.bz2
linux-90bcaf7b4a33bb9b100cc06869f0c033a870d4a0.zip
[IPV6]: flowlabels are net-endian
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_output.c')
-rw-r--r--net/ipv6/ip6_output.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 66716911962e..9ff1be1bc2e7 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -217,7 +217,7 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl,
if (tclass < 0)
tclass = 0;
- *(u32 *)hdr = htonl(0x60000000 | (tclass << 20)) | fl->fl6_flowlabel;
+ *(__be32 *)hdr = htonl(0x60000000 | (tclass << 20)) | fl->fl6_flowlabel;
hdr->payload_len = htons(seg_len);
hdr->nexthdr = proto;
@@ -1311,7 +1311,7 @@ int ip6_push_pending_frames(struct sock *sk)
skb->nh.ipv6h = hdr = (struct ipv6hdr*) skb_push(skb, sizeof(struct ipv6hdr));
- *(u32*)hdr = fl->fl6_flowlabel |
+ *(__be32*)hdr = fl->fl6_flowlabel |
htonl(0x60000000 | ((int)np->cork.tclass << 20));
if (skb->len <= sizeof(struct ipv6hdr) + IPV6_MAXPLEN)