summaryrefslogtreecommitdiff
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
authorStephen Suryaputra <ssuryaextr@gmail.com>2018-04-16 13:42:16 -0400
committerDavid S. Miller <davem@davemloft.net>2018-04-17 13:39:51 -0400
commitbdb7cc643fc9db8d6ed9a2b9e524e27ac5882029 (patch)
treea0682f0b12435422ac8699fe2fe29c2a7f5dcd63 /net/ipv6/route.c
parent032234d8231909ac049f22ea3b408487e1c103eb (diff)
downloadlwn-bdb7cc643fc9db8d6ed9a2b9e524e27ac5882029.tar.gz
lwn-bdb7cc643fc9db8d6ed9a2b9e524e27ac5882029.zip
ipv6: Count interface receive statistics on the ingress netdev
The statistics such as InHdrErrors should be counted on the ingress netdev rather than on the dev from the dst, which is the egress. Signed-off-by: Stephen Suryaputra <ssuryaextr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r--net/ipv6/route.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 49b954d6d0fa..1d738bfe893b 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -3541,7 +3541,8 @@ static int ip6_pkt_drop(struct sk_buff *skb, u8 code, int ipstats_mib_noroutes)
case IPSTATS_MIB_INNOROUTES:
type = ipv6_addr_type(&ipv6_hdr(skb)->daddr);
if (type == IPV6_ADDR_ANY) {
- IP6_INC_STATS(dev_net(dst->dev), ip6_dst_idev(dst),
+ IP6_INC_STATS(dev_net(dst->dev),
+ __in6_dev_get_safely(skb->dev),
IPSTATS_MIB_INADDRERRORS);
break;
}