Loading include/linux/ipv6.h +5 −0 Original line number Diff line number Diff line Loading @@ -233,6 +233,11 @@ static inline struct ipv6hdr *ipipv6_hdr(const struct sk_buff *skb) return (struct ipv6hdr *)skb_transport_header(skb); } static inline __u8 ipv6_tclass(const struct ipv6hdr *iph) { return (ntohl(*(__be32 *)iph) >> 20) & 0xff; } /* This structure contains results of exthdrs parsing as offsets from skb->nh. Loading net/ipv6/datagram.c +1 −1 Original line number Diff line number Diff line Loading @@ -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); } Loading Loading
include/linux/ipv6.h +5 −0 Original line number Diff line number Diff line Loading @@ -233,6 +233,11 @@ static inline struct ipv6hdr *ipipv6_hdr(const struct sk_buff *skb) return (struct ipv6hdr *)skb_transport_header(skb); } static inline __u8 ipv6_tclass(const struct ipv6hdr *iph) { return (ntohl(*(__be32 *)iph) >> 20) & 0xff; } /* This structure contains results of exthdrs parsing as offsets from skb->nh. Loading
net/ipv6/datagram.c +1 −1 Original line number Diff line number Diff line Loading @@ -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); } Loading