summaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2019-11-20 12:33:59 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2019-12-17 22:58:23 +0100
commit871185ace40df871a93866b2a7ce441276fc4ee8 (patch)
tree2664c98c9a8a6647ceb6c5742f85eaff3d27069a /net/core/dev.c
parent6f6dded1385cfb564de85f86126f1c054c8f47b1 (diff)
downloadlinux-871185ace40df871a93866b2a7ce441276fc4ee8.tar.gz
linux-871185ace40df871a93866b2a7ce441276fc4ee8.tar.bz2
linux-871185ace40df871a93866b2a7ce441276fc4ee8.zip
netfilter: Clean up unnecessary #ifdef
If CONFIG_NETFILTER_INGRESS is not enabled, nf_ingress() becomes a no-op because it solely contains an if-clause calling nf_hook_ingress_active(), for which an empty inline stub exists in <linux/netfilter_ingress.h>. All the symbols used in the if-clause's body are still available even if CONFIG_NETFILTER_INGRESS is not enabled. The additional "#ifdef CONFIG_NETFILTER_INGRESS" in nf_ingress() is thus unnecessary, so drop it. Signed-off-by: Lukas Wunner <lukas@wunner.de> Cc: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 2c277b8aba38..1ccead4b19bf 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4932,7 +4932,6 @@ static bool skb_pfmemalloc_protocol(struct sk_buff *skb)
static inline int nf_ingress(struct sk_buff *skb, struct packet_type **pt_prev,
int *ret, struct net_device *orig_dev)
{
-#ifdef CONFIG_NETFILTER_INGRESS
if (nf_hook_ingress_active(skb)) {
int ingress_retval;
@@ -4946,7 +4945,6 @@ static inline int nf_ingress(struct sk_buff *skb, struct packet_type **pt_prev,
rcu_read_unlock();
return ingress_retval;
}
-#endif /* CONFIG_NETFILTER_INGRESS */
return 0;
}