Commit 82e9f105a28006e7ff864220a28cf62ea6d1e280
Committed by
David S. Miller
1 parent
37cfee909c
Exists in
smarc-imx_3.14.28_1.0.0_ga
and in
1 other branch
ipv6: remove rcv_tclass of ipv6_pinfo
tclass information in now already stored in rcv_flowinfo We do not need to store the same information twice. Signed-off-by: Florent Fourcot <florent.fourcot@enst-bretagne.fr> Reviewed-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 3 changed files with 2 additions and 7 deletions Side-by-side Diff
include/linux/ipv6.h
net/ipv6/ipv6_sockglue.c
... | ... | @@ -1019,7 +1019,7 @@ |
1019 | 1019 | put_cmsg(&msg, SOL_IPV6, IPV6_HOPLIMIT, sizeof(hlim), &hlim); |
1020 | 1020 | } |
1021 | 1021 | if (np->rxopt.bits.rxtclass) { |
1022 | - int tclass = np->rcv_tclass; | |
1022 | + int tclass = ntohl(np->rcv_flowinfo & IPV6_TCLASS_MASK) >> 20; | |
1023 | 1023 | put_cmsg(&msg, SOL_IPV6, IPV6_TCLASS, sizeof(tclass), &tclass); |
1024 | 1024 | } |
1025 | 1025 | if (np->rxopt.bits.rxoinfo) { |
net/ipv6/tcp_ipv6.c
... | ... | @@ -1135,7 +1135,6 @@ |
1135 | 1135 | newnp->opt = NULL; |
1136 | 1136 | newnp->mcast_oif = inet6_iif(skb); |
1137 | 1137 | newnp->mcast_hops = ipv6_hdr(skb)->hop_limit; |
1138 | - newnp->rcv_tclass = ipv6_get_dsfield(ipv6_hdr(skb)); | |
1139 | 1138 | newnp->rcv_flowinfo = ip6_flowinfo(ipv6_hdr(skb)); |
1140 | 1139 | |
1141 | 1140 | /* |
... | ... | @@ -1216,7 +1215,6 @@ |
1216 | 1215 | newnp->opt = NULL; |
1217 | 1216 | newnp->mcast_oif = inet6_iif(skb); |
1218 | 1217 | newnp->mcast_hops = ipv6_hdr(skb)->hop_limit; |
1219 | - newnp->rcv_tclass = ipv6_get_dsfield(ipv6_hdr(skb)); | |
1220 | 1218 | newnp->rcv_flowinfo = ip6_flowinfo(ipv6_hdr(skb)); |
1221 | 1219 | |
1222 | 1220 | /* Clone native IPv6 options from listening socket (if any) |
... | ... | @@ -1427,9 +1425,7 @@ |
1427 | 1425 | np->mcast_oif = inet6_iif(opt_skb); |
1428 | 1426 | if (np->rxopt.bits.rxhlim || np->rxopt.bits.rxohlim) |
1429 | 1427 | np->mcast_hops = ipv6_hdr(opt_skb)->hop_limit; |
1430 | - if (np->rxopt.bits.rxtclass) | |
1431 | - np->rcv_tclass = ipv6_get_dsfield(ipv6_hdr(opt_skb)); | |
1432 | - if (np->rxopt.bits.rxflow) | |
1428 | + if (np->rxopt.bits.rxflow || np->rxopt.bits.rxtclass) | |
1433 | 1429 | np->rcv_flowinfo = ip6_flowinfo(ipv6_hdr(opt_skb)); |
1434 | 1430 | if (ipv6_opt_accepted(sk, opt_skb)) { |
1435 | 1431 | skb_set_owner_r(opt_skb, sk); |