In preparation for native mark match support. Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> --- iptables/nft-arp.c | 2 +- iptables/nft-bridge.c | 2 +- iptables/nft-ipv4.c | 2 +- iptables/nft-ipv6.c | 2 +- iptables/nft-shared.c | 6 +++--- iptables/nft-shared.h | 6 +++--- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/iptables/nft-arp.c b/iptables/nft-arp.c index 028b06a608e4..89e6413441e2 100644 --- a/iptables/nft-arp.c +++ b/iptables/nft-arp.c @@ -174,7 +174,7 @@ static void nft_arp_parse_meta(struct nft_xt_ctx *ctx, struct nftnl_expr *e, struct arpt_entry *fw = &cs->arp; uint8_t flags = 0; - parse_meta(e, ctx->meta.key, fw->arp.iniface, fw->arp.iniface_mask, + parse_meta(ctx, e, ctx->meta.key, fw->arp.iniface, fw->arp.iniface_mask, fw->arp.outiface, fw->arp.outiface_mask, &flags); diff --git a/iptables/nft-bridge.c b/iptables/nft-bridge.c index d4b66a25c740..097ef6e16827 100644 --- a/iptables/nft-bridge.c +++ b/iptables/nft-bridge.c @@ -171,7 +171,7 @@ static void nft_bridge_parse_meta(struct nft_xt_ctx *ctx, uint8_t invflags = 0; char iifname[IFNAMSIZ] = {}, oifname[IFNAMSIZ] = {}; - parse_meta(e, ctx->meta.key, iifname, NULL, oifname, NULL, &invflags); + parse_meta(ctx, e, ctx->meta.key, iifname, NULL, oifname, NULL, &invflags); switch (ctx->meta.key) { case NFT_META_BRI_IIFNAME: diff --git a/iptables/nft-ipv4.c b/iptables/nft-ipv4.c index af3d0c98b798..cf03edfae9ac 100644 --- a/iptables/nft-ipv4.c +++ b/iptables/nft-ipv4.c @@ -144,7 +144,7 @@ static void nft_ipv4_parse_meta(struct nft_xt_ctx *ctx, struct nftnl_expr *e, break; } - parse_meta(e, ctx->meta.key, cs->fw.ip.iniface, cs->fw.ip.iniface_mask, + parse_meta(ctx, e, ctx->meta.key, cs->fw.ip.iniface, cs->fw.ip.iniface_mask, cs->fw.ip.outiface, cs->fw.ip.outiface_mask, &cs->fw.ip.invflags); } diff --git a/iptables/nft-ipv6.c b/iptables/nft-ipv6.c index 892a48541593..5b767a4059e6 100644 --- a/iptables/nft-ipv6.c +++ b/iptables/nft-ipv6.c @@ -117,7 +117,7 @@ static void nft_ipv6_parse_meta(struct nft_xt_ctx *ctx, struct nftnl_expr *e, break; } - parse_meta(e, ctx->meta.key, cs->fw6.ipv6.iniface, + parse_meta(ctx, e, ctx->meta.key, cs->fw6.ipv6.iniface, cs->fw6.ipv6.iniface_mask, cs->fw6.ipv6.outiface, cs->fw6.ipv6.outiface_mask, &cs->fw6.ipv6.invflags); } diff --git a/iptables/nft-shared.c b/iptables/nft-shared.c index b3993211c79d..5b13b29c9844 100644 --- a/iptables/nft-shared.c +++ b/iptables/nft-shared.c @@ -261,9 +261,9 @@ static void parse_ifname(const char *name, unsigned int len, char *dst, unsigned memset(mask, 0xff, len - 2); } -int parse_meta(struct nftnl_expr *e, uint8_t key, char *iniface, - unsigned char *iniface_mask, char *outiface, - unsigned char *outiface_mask, uint8_t *invflags) +int parse_meta(struct nft_xt_ctx *ctx, struct nftnl_expr *e, uint8_t key, + char *iniface, unsigned char *iniface_mask, + char *outiface, unsigned char *outiface_mask, uint8_t *invflags) { uint32_t value; const void *ifname; diff --git a/iptables/nft-shared.h b/iptables/nft-shared.h index 7b337943836a..092958cd67fa 100644 --- a/iptables/nft-shared.h +++ b/iptables/nft-shared.h @@ -156,9 +156,9 @@ bool is_same_interfaces(const char *a_iniface, const char *a_outiface, unsigned const char *b_iniface_mask, unsigned const char *b_outiface_mask); -int parse_meta(struct nftnl_expr *e, uint8_t key, char *iniface, - unsigned char *iniface_mask, char *outiface, - unsigned char *outiface_mask, uint8_t *invflags); +int parse_meta(struct nft_xt_ctx *ctx, struct nftnl_expr *e, uint8_t key, + char *iniface, unsigned char *iniface_mask, char *outiface, + unsigned char *outiface_mask, uint8_t *invflags); void get_cmp_data(struct nftnl_expr *e, void *data, size_t dlen, bool *inv); void nft_rule_to_iptables_command_state(struct nft_handle *h, const struct nftnl_rule *r, -- 2.30.2