]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
xtables: Drop xtables' family on demand feature
authorPhil Sutter <phil@nwl.cc>
Fri, 26 Nov 2021 17:26:07 +0000 (18:26 +0100)
committerPhil Sutter <phil@nwl.cc>
Wed, 12 Jan 2022 13:04:52 +0000 (14:04 +0100)
This conditional h->family assignment was added by commit 3f7877e6be987
("xtables-restore: add -4 and -6 support") with the intention to support
something like 'xtables-restore -6 <ip6tables.dump', i.e. having
family-agnostic commands which accept flags to set the family. Yet
commit be70918eab26e ("xtables: rename xt-multi binaries to -nft,
-legacy") removed support for such command names back in 2018 and nobody
has complained so far. Therefore drop this leftover as it makes
do_parse() more generic.

Signed-off-by: Phil Sutter <phil@nwl.cc>
iptables/xtables.c

index 57bec76c31fb33823555c8c1b667434e6efa5f1e..5c48bd94644f32c07c24f9535a632ff1e18eae7b 100644 (file)
@@ -657,10 +657,6 @@ void do_parse(struct nft_handle *h, int argc, char *argv[],
                xtables_error(PARAMETER_PROBLEM,
                           "nothing appropriate following !");
 
-       /* Set only if required, needed by xtables-restore */
-       if (h->family == AF_UNSPEC)
-               h->family = args->family;
-
        h->ops->post_parse(p->command, cs, args);
 
        if (p->command == CMD_REPLACE &&