diff options
-rw-r--r-- | iptables/nft-arp.c | 4 | ||||
-rw-r--r-- | iptables/nft-bridge.c | 4 | ||||
-rw-r--r-- | iptables/nft-shared.c | 7 | ||||
-rw-r--r-- | iptables/nft-shared.h | 4 | ||||
-rw-r--r-- | iptables/nft.c | 2 |
5 files changed, 10 insertions, 11 deletions
diff --git a/iptables/nft-arp.c b/iptables/nft-arp.c index de774339..5ad7556c 100644 --- a/iptables/nft-arp.c +++ b/iptables/nft-arp.c @@ -632,7 +632,7 @@ static bool nft_arp_is_same(const void *data_a, (unsigned char *)b->arp.outiface_mask); } -static bool nft_arp_rule_find(struct nft_family_ops *ops, struct nftnl_rule *r, +static bool nft_arp_rule_find(struct nft_handle *h, struct nftnl_rule *r, void *data) { const struct iptables_command_state *cs = data; @@ -653,7 +653,7 @@ static bool nft_arp_rule_find(struct nft_family_ops *ops, struct nftnl_rule *r, ret = true; out: - ops->clear_cs(&this); + h->ops->clear_cs(&this); return ret; } diff --git a/iptables/nft-bridge.c b/iptables/nft-bridge.c index 0fc21b3a..73bca2f3 100644 --- a/iptables/nft-bridge.c +++ b/iptables/nft-bridge.c @@ -537,7 +537,7 @@ static bool nft_bridge_is_same(const void *data_a, const void *data_b) return strcmp(a->in, b->in) == 0 && strcmp(a->out, b->out) == 0; } -static bool nft_bridge_rule_find(struct nft_family_ops *ops, struct nftnl_rule *r, +static bool nft_bridge_rule_find(struct nft_handle *h, struct nftnl_rule *r, void *data) { struct iptables_command_state *cs = data; @@ -568,7 +568,7 @@ static bool nft_bridge_rule_find(struct nft_family_ops *ops, struct nftnl_rule * ret = true; out: - ops->clear_cs(&this); + h->ops->clear_cs(&this); return ret; } diff --git a/iptables/nft-shared.c b/iptables/nft-shared.c index 6fd8ade5..b6d85f1a 100644 --- a/iptables/nft-shared.c +++ b/iptables/nft-shared.c @@ -982,8 +982,7 @@ void nft_ipv46_parse_target(struct xtables_target *t, void *data) cs->target = t; } -bool nft_ipv46_rule_find(struct nft_family_ops *ops, - struct nftnl_rule *r, void *data) +bool nft_ipv46_rule_find(struct nft_handle *h, struct nftnl_rule *r, void *data) { struct iptables_command_state *cs = data, this = {}; bool ret = false; @@ -994,7 +993,7 @@ bool nft_ipv46_rule_find(struct nft_family_ops *ops, #ifdef DEBUG_DEL nft_rule_print_save(r, NFT_RULE_APPEND, 0); #endif - if (!ops->is_same(cs, &this)) + if (!h->ops->is_same(cs, &this)) goto out; if (!compare_matches(cs->matches, this.matches)) { @@ -1014,7 +1013,7 @@ bool nft_ipv46_rule_find(struct nft_family_ops *ops, ret = true; out: - ops->clear_cs(&this); + h->ops->clear_cs(&this); return ret; } diff --git a/iptables/nft-shared.h b/iptables/nft-shared.h index 1cb2ea70..8c64d6e7 100644 --- a/iptables/nft-shared.h +++ b/iptables/nft-shared.h @@ -104,7 +104,7 @@ struct nft_family_ops { void (*rule_to_cs)(const struct nftnl_rule *r, struct iptables_command_state *cs); void (*clear_cs)(struct iptables_command_state *cs); - bool (*rule_find)(struct nft_family_ops *ops, struct nftnl_rule *r, + bool (*rule_find)(struct nft_handle *h, struct nftnl_rule *r, void *data); int (*xlate)(const void *data, struct xt_xlate *xl); }; @@ -165,7 +165,7 @@ void save_matches_and_target(const struct iptables_command_state *cs, struct nft_family_ops *nft_family_ops_lookup(int family); void nft_ipv46_parse_target(struct xtables_target *t, void *data); -bool nft_ipv46_rule_find(struct nft_family_ops *ops, struct nftnl_rule *r, +bool nft_ipv46_rule_find(struct nft_handle *h, struct nftnl_rule *r, void *data); bool compare_matches(struct xtables_rule_match *mt1, struct xtables_rule_match *mt2); diff --git a/iptables/nft.c b/iptables/nft.c index e31f2834..387aada9 100644 --- a/iptables/nft.c +++ b/iptables/nft.c @@ -1907,7 +1907,7 @@ nft_rule_find(struct nft_handle *h, struct nftnl_chain *c, void *data, int rulen r = nftnl_rule_iter_next(iter); while (r != NULL) { - found = h->ops->rule_find(h->ops, r, data); + found = h->ops->rule_find(h, r, data); if (found) break; r = nftnl_rule_iter_next(iter); |