]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libxtables: store all requested match types
authorFlorian Westphal <fw@strlen.de>
Fri, 11 May 2018 21:17:15 +0000 (23:17 +0200)
committerFlorian Westphal <fw@strlen.de>
Sun, 13 May 2018 23:24:26 +0000 (01:24 +0200)
iptables and ip6tables don't need this because iptables is AF_INET,
ip6tables AF_INET6, etc.

But tools that can change af in-between such as nftables will then
may then find to find such module.

One example is conntrack, it offsers NFPROTO_IPV4 and NFPROTO_IPV6.
When first loading with NFPROTO_IPV6, the IPV4 would be discarded.

Signed-off-by: Florian Westphal <fw@strlen.de>
libxtables/xtables.c

index c5e86f389d473ffb7b56672be5e5322641fb2852..f3966f15617a89b487dd2d54dad891360430b98b 100644 (file)
@@ -933,9 +933,6 @@ void xtables_register_match(struct xtables_match *me)
        if (me->extra_opts != NULL)
                xtables_check_options(me->name, me->extra_opts);
 
-       /* ignore not interested match */
-       if (me->family != afinfo->family && me->family != AF_UNSPEC)
-               return;
 
        /* place on linked list of matches pending full registration */
        me->next = xtables_pending_matches;