summaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorJiri Benc <jbenc@redhat.com>2012-02-09 10:34:41 +0100
committerDavid S. Miller <davem@davemloft.net>2012-02-13 06:45:38 +0100
commit7a3198a89722ad9521d22b05938d357eac7460fa (patch)
treeca5766b459c7a9a1502fa519a9d287c7c29dcd9c /net/ipv6
parentaeroflex: Fix typo in greth.c (diff)
downloadlinux-7a3198a89722ad9521d22b05938d357eac7460fa.tar.xz
linux-7a3198a89722ad9521d22b05938d357eac7460fa.zip
ipv6: helper function to get tclass
Implement helper inline function to get traffic class from IPv6 header. Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/datagram.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c
index 251e7cd75e89..76832c8dc89d 100644
--- a/net/ipv6/datagram.c
+++ b/net/ipv6/datagram.c
@@ -485,7 +485,7 @@ int datagram_recv_ctl(struct sock *sk, struct msghdr *msg, struct sk_buff *skb)
}
if (np->rxopt.bits.rxtclass) {
- int tclass = (ntohl(*(__be32 *)ipv6_hdr(skb)) >> 20) & 0xff;
+ int tclass = ipv6_tclass(ipv6_hdr(skb));
put_cmsg(msg, SOL_IPV6, IPV6_TCLASS, sizeof(tclass), &tclass);
}