summaryrefslogtreecommitdiffstats
path: root/extensions/libebt_nflog.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2018-12-20 16:09:04 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2018-12-27 18:41:44 +0100
commit9523b2e9dee3d9b4439214092c496542ce9f434e (patch)
tree171163fd298f9d5780a3dd482881d2cda4715abd /extensions/libebt_nflog.c
parent7e09582a57440f13796bdd5bd70466ef0913345b (diff)
xtables-restore: Review chain handling
There is no need to "delete" (actually, remove from cache) a chain if noflush wasn't given: While handling the corresponding table line, 'table_flush' callback has already taken care of that. This .chain_del indirection is not required since d1eb4d587297 ("iptables-compat: chains are purge out already from table flush"). Streamlining the code further, move syntax checks to the top. If these concede, there are three cases to distinguish: A) Given chain name matches a builtin one in current table, so assume it exists already and just set policy and counters. B) Noflush was given and the (custom) chain exists already, flush it. C) Custom chain was either flushed (noflush not given) or didn't exist before, create it. Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'extensions/libebt_nflog.c')
0 files changed, 0 insertions, 0 deletions