From ac4c84cc63d3cc021ca532692885a644fcde4518 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 4 Mar 2022 12:50:01 +0100 Subject: libxtables: Boost rule target checks by announcing chain names When restoring a ruleset, feed libxtables with chain names from respective lines to avoid an extension search. While the user's intention is clear, this effectively disables the sanity check for clashes with target extensions. But: * The check yielded only a warning and the clashing chain was finally accepted. * Users crafting iptables dumps for feeding into iptables-restore likely know what they're doing. Signed-off-by: Phil Sutter Acked-by: Florian Westphal --- include/xtables.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/xtables.h b/include/xtables.h index 044f191f..84369dac 100644 --- a/include/xtables.h +++ b/include/xtables.h @@ -654,6 +654,9 @@ const char *xt_xlate_get(struct xt_xlate *xl); #define xt_xlate_rule_get xt_xlate_get const char *xt_xlate_set_get(struct xt_xlate *xl); +/* informed target lookups */ +void xtables_announce_chain(const char *name); + #ifdef XTABLES_INTERNAL /* Shipped modules rely on this... */ -- cgit v1.2.3