Skip to contentSkip to conversation

libxtables: Store all requested target types

PATCH In review Phil Sutter 1 participant 2 messages Jan 23 – Jan 27 netfilter

lore
Share & tools
lore

Phil Sutter

author reviewer
#0 lore raw

PATCH 1/1 libxtables: Store all requested target types

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.

---
 libxtables/xtables.c | 4 ----
 1 file changed, 4 deletions(-)
libxtables/xtables.c +0 -4
index 5fc50a63f380b..af56a75fcb117 100644
@@ -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 */
Signature · 1 line
2.51.0
author reviewer
#1 lore raw
Quoted 8 lines · Phil Sutter

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.

Patch applied.