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>
This commit is contained in:
committed by
David S. Miller
parent
032234d823
commit
bdb7cc643f
@@ -307,6 +307,20 @@ static inline struct inet6_dev *__in6_dev_get(const struct net_device *dev)
|
||||
return rcu_dereference_rtnl(dev->ip6_ptr);
|
||||
}
|
||||
|
||||
/**
|
||||
* __in6_dev_get_safely - get inet6_dev pointer from netdevice
|
||||
* @dev: network device
|
||||
*
|
||||
* This is a safer version of __in6_dev_get
|
||||
*/
|
||||
static inline struct inet6_dev *__in6_dev_get_safely(const struct net_device *dev)
|
||||
{
|
||||
if (likely(dev))
|
||||
return rcu_dereference_rtnl(dev->ip6_ptr);
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* in6_dev_get - get inet6_dev pointer from netdevice
|
||||
* @dev: network device
|
||||
|
||||
Reference in New Issue
Block a user