All of lore.kernel.org
 help / color / mirror / Atom feed
* rfc: reject use of drop in nat table
@ 2008-08-04 16:54 Jan Engelhardt
  2008-08-04 16:57 ` Patrick McHardy
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Engelhardt @ 2008-08-04 16:54 UTC (permalink / raw)
  To: kaber; +Cc: Netfilter Developer Mailing List



This just happened to be within my thoughts. Comments, declinations?

commit 344a4b52b8484460727ed605e042583dbc73ac83
Author: Jan Engelhardt <jengelh@medozas.de>
Date:   Thu Jul 3 19:06:22 2008 +0200

    Reject use of DROP in nat table
    
    Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
 iptables.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/iptables.c b/iptables.c
index 41e1836..6e7242d 100644
--- a/iptables.c
+++ b/iptables.c
@@ -1917,6 +1917,12 @@ int do_command(int argc, char *argv[], char **table, iptc_handle_t *handle)
 		invert = FALSE;
 	}
 
+	if (strcmp(*table, "nat") == 0) {
+		if ((policy != NULL && strcmp(policy, "DROP") == 0) ||
+		    (jumpto != NULL && strcmp(jumpto, "DROP") == 0))
+			exit_error(OTHER_PROBLEM, "The nat table is not for filtering");
+	}
+
 	for (matchp = matches; matchp; matchp = matchp->next)
 		if (matchp->match->final_check != NULL)
 			matchp->match->final_check(matchp->match->mflags);

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

end of thread, other threads:[~2008-08-13 12:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-04 16:54 rfc: reject use of drop in nat table Jan Engelhardt
2008-08-04 16:57 ` Patrick McHardy
2008-08-04 18:05   ` Phil Oester
2008-08-04 18:55   ` Jozsef Kadlecsik
2008-08-04 19:08     ` Patrick McHardy
2008-08-10 14:44       ` Jan Engelhardt
2008-08-13 12:42         ` Patrick McHardy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.