]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libxtables: Store all requested target types master
authorPhil Sutter <phil@nwl.cc>
Thu, 22 Jan 2026 17:06:07 +0000 (18:06 +0100)
committerPhil Sutter <phil@nwl.cc>
Tue, 27 Jan 2026 19:49:44 +0000 (20:49 +0100)
Repeat the change in commit 1a696c99d278c ("libxtables: store all
requested match types") for target registration. An obvious use-case
affected as described in that commit is an 'nft list ruleset' process
translating different families' extensions in one go. If the same
extension is used in multiple families, only the first one is being
found.

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

index 5fc50a63f380bed3ca3dabc2edd48bd230e8cb43..af56a75fcb117b2a30508e9d8196120d23ed372c 100644 (file)
@@ -1345,10 +1345,6 @@ void xtables_register_target(struct xtables_target *me)
        if (me->extra_opts != NULL)
                xtables_check_options(me->name, me->extra_opts);
 
-       /* ignore not interested target */
-       if (me->family != afinfo->family && me->family != AF_UNSPEC)
-               return;
-
        /* order into linked list of targets pending full registration */
        for (pos = &xtables_pending_targets; *pos; pos = &(*pos)->next) {
                /* group by name */