netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nf-next,v2 01/10] netfilter: get rid of useless debugging from core
@ 2016-11-03 12:37 Pablo Neira Ayuso
  2016-11-03 12:37 ` [PATCH nf-next,v2 02/10] netfilter: remove comments that predate rcu days Pablo Neira Ayuso
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Pablo Neira Ayuso @ 2016-11-03 12:37 UTC (permalink / raw)
  To: netfilter-devel

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>
---
v2: rebased on top on nf-next that now includes the nf_queue fix dependency.
    No changes.

 net/netfilter/core.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/net/netfilter/core.c b/net/netfilter/core.c
index 004af030ef1a..3d4aa96cb219 100644
--- a/net/netfilter/core.c
+++ b/net/netfilter/core.c
@@ -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;
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-11-03 12:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-03 12:37 [PATCH nf-next,v2 01/10] netfilter: get rid of useless debugging from core Pablo Neira Ayuso
2016-11-03 12:37 ` [PATCH nf-next,v2 02/10] netfilter: remove comments that predate rcu days Pablo Neira Ayuso
2016-11-03 12:37 ` [PATCH nf-next,v2 03/10] netfilter: kill NF_HOOK_THRESH() and state->tresh Pablo Neira Ayuso
2016-11-03 12:37 ` [PATCH nf-next,v2 04/10] netfilter: deprecate NF_STOP Pablo Neira Ayuso
2016-11-03 12:37 ` [PATCH nf-next,v2 05/10] netfilter: x_tables: move hook state into xt_action_param structure Pablo Neira Ayuso
2016-11-03 12:37 ` [PATCH nf-next,v2 06/10] netfilter: nf_tables: use hook state from " Pablo Neira Ayuso
2016-11-03 12:37 ` [PATCH nf-next,v2 07/10] netfilter: use switch() to handle verdict cases from nf_hook_slow() Pablo Neira Ayuso
2016-11-03 12:37 ` [PATCH nf-next,v2 08/10] netfilter: remove hook_entries field from nf_hook_state Pablo Neira Ayuso
2016-11-03 12:37 ` [PATCH nf-next,v2 09/10] netfilter: merge nf_iterate() into nf_hook_slow() Pablo Neira Ayuso
2016-11-03 12:37 ` [PATCH nf-next 10/10] netfilter: handle NF_REPEAT from nf_conntrack_in() Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).