ipv6: remove rcv_tclass of ipv6_pinfo
[linux-drm-fsl-dcu.git] / net / ipv6 / ipv6_sockglue.c
index c2db1df46385600f7125eed1270d7b0685376078..7d93915068565c2a56149a8de363956253e6411b 100644 (file)
@@ -1019,7 +1019,7 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
                                put_cmsg(&msg, SOL_IPV6, IPV6_HOPLIMIT, sizeof(hlim), &hlim);
                        }
                        if (np->rxopt.bits.rxtclass) {
-                               int tclass = np->rcv_tclass;
+                               int tclass = ntohl(np->rcv_flowinfo & IPV6_TCLASS_MASK) >> 20;
                                put_cmsg(&msg, SOL_IPV6, IPV6_TCLASS, sizeof(tclass), &tclass);
                        }
                        if (np->rxopt.bits.rxoinfo) {