aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/addrconf.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2019-06-25 01:32:59 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2019-06-25 01:32:59 +0200
commit1c5ba67d2277ac2faf37c61076e8b5fa312be492 (patch)
treea645a1a2f7aea7faafcd67c6ba1bfd424b95cd7d /include/net/addrconf.h
parentnetfilter: nf_tables: add support for matching IPv4 options (diff)
parentMerge branch 'cxgb4-Reference-count-MPS-TCAM-entries-within-a-PF' (diff)
downloadlinux-dev-1c5ba67d2277ac2faf37c61076e8b5fa312be492.tar.xz
linux-dev-1c5ba67d2277ac2faf37c61076e8b5fa312be492.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Resolve conflict between d2912cb15bdd ("treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500") removing the GPL disclaimer and fe03d4745675 ("Update my email address") which updates Jozsef Kadlecsik's email. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net/addrconf.h')
-rw-r--r--include/net/addrconf.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/net/addrconf.h b/include/net/addrconf.h
index 2f67ae854ff0..becdad576859 100644
--- a/include/net/addrconf.h
+++ b/include/net/addrconf.h
@@ -310,6 +310,22 @@ static inline struct inet6_dev *__in6_dev_get(const struct net_device *dev)
}
/**
+ * __in6_dev_stats_get - get inet6_dev pointer for stats
+ * @dev: network device
+ * @skb: skb for original incoming interface if neeeded
+ *
+ * Caller must hold rcu_read_lock or RTNL, because this function
+ * does not take a reference on the inet6_dev.
+ */
+static inline struct inet6_dev *__in6_dev_stats_get(const struct net_device *dev,
+ const struct sk_buff *skb)
+{
+ if (netif_is_l3_master(dev))
+ dev = dev_get_by_index_rcu(dev_net(dev), inet6_iif(skb));
+ return __in6_dev_get(dev);
+}
+
+/**
* __in6_dev_get_safely - get inet6_dev pointer from netdevice
* @dev: network device
*