diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-11-08 11:25:17 +0300 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 08:21:21 +0300 |
commit | 90bcaf7b4a33bb9b100cc06869f0c033a870d4a0 (patch) | |
tree | fb8307b99fd9779d17fdfb0c35d836a8438d424a /net/ipv6/ip6_output.c | |
parent | 92d9ece7af9c84bfbd1ff640926fac5b573a09f7 (diff) | |
download | linux-90bcaf7b4a33bb9b100cc06869f0c033a870d4a0.tar.xz |
[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.c | 4 |
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) |