diff options
author | Stefan Tomanek <stefan.tomanek@wertarbyte.de> | 2011-03-08 22:42:51 +0100 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2011-03-08 23:12:05 +0100 |
commit | d59b9db031abee37a9aa9776662dd15370faabf4 (patch) | |
tree | 47481f2b5f1afbc122f494beca1375de661c1160 /ip6tables-multi.h | |
parent | 9cc4f24e72f87ca191c2e723e7cd293f6477481c (diff) |
iptables: add -C to check for existing rules
It is often useful to check whether a specific rule is already present
in a chain without actually modifying the iptables config.
Services like fail2ban usually employ techniques like grepping through
the output of "iptables -L" which is quite error prone.
This patch adds a new operation -C to the iptables command which
mostly works like -D; it can detect and indicate the existence of the
specified rule by modifying the exit code. The new operation
TC_CHECK_ENTRY uses the same code as the -D operation, whose functions
got a dry-run parameter appended.
Signed-off-by: Stefan Tomanek <stefan.tomanek@wertarbyte.de>
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'ip6tables-multi.h')
0 files changed, 0 insertions, 0 deletions