ip6tables: Warn about use of DROP in nat table
PATCH 1/1 ip6tables: Warn about use of DROP in nat table
Clone of 1eada72b with 9bb76094 and e0390bee on top.
Signed-off-by Thomas Woerner <[email protected]>
---
:100644 100644 2731209... c48ddf9... M iptables/ip6tables.c
iptables/ip6tables.c | 7 +++++++ 1 file changed, 7 insertions(+)
iptables/ip6tables.c +7 -0
@@ -1720,6 +1720,13 @@ int do_command6(int argc, char *argv[], char **table, cs.invert = FALSE; } +if (strcmp (*table,"nat" ) ==0 && + ((policy !=NULL &&strcmp (policy,"DROP" ) ==0 ) || + (cs.jumpto !=NULL &&strcmp (cs.jumpto,"DROP" ) ==0 ))) +xtables_error (PARAMETER_PROBLEM , +"\nThe \"nat\" table is not intended for filtering, " +"the use of DROP is therefore inhibited.\n\n" ); +for (matchp = cs.matches; matchp; matchp = matchp->next)xtables_option_mfcall (matchp->match);if (cs.target !=NULL )
Signature · 1 line
2.5.5
Quoted 1 line · Thomas Woerner
Clone of
1eada72bwith9bb76094ande0390beeon top.
Applied, thanks Thomas.