netfilter: get rid of useless debugging from core
authorPablo Neira Ayuso <pablo@netfilter.org>
Thu, 3 Nov 2016 09:55:54 +0000 (10:55 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 3 Nov 2016 09:55:54 +0000 (10:55 +0100)
This patch remove compile time code to catch inconventional verdicts.
We have better ways to handle this case these days, eg. pr_debug() but
even though I don't think this is useful at all, so let's remove this.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/core.c

index 004af030ef1abcdf554467f60a350649e205d80e..3d4aa96cb2197c3a2ff9eee4aa4f9140b5feabd1 100644 (file)
@@ -323,15 +323,6 @@ unsigned int nf_iterate(struct sk_buff *skb,
 repeat:
                verdict = (*entryp)->ops.hook((*entryp)->ops.priv, skb, state);
                if (verdict != NF_ACCEPT) {
-#ifdef CONFIG_NETFILTER_DEBUG
-                       if (unlikely((verdict & NF_VERDICT_MASK)
-                                                       > NF_MAX_VERDICT)) {
-                               NFDEBUG("Evil return from %p(%u).\n",
-                                       (*entryp)->ops.hook, state->hook);
-                               *entryp = rcu_dereference((*entryp)->next);
-                               continue;
-                       }
-#endif
                        if (verdict != NF_REPEAT)
                                return verdict;
                        goto repeat;