summaryrefslogtreecommitdiffstats
path: root/net/ipv4/netfilter/nft_masq_ipv4.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2015-04-11 02:27:31 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2015-04-13 17:17:07 +0200
commita55e22e92f1a31018e6dc8fce35380900f022c24 (patch)
tree6acac379a7a836efbae5aa2b0bac292b953f0db4 /net/ipv4/netfilter/nft_masq_ipv4.c
parentd07db9884a5fba8c8020166c86183c79a18d066a (diff)
downloadop-kernel-dev-a55e22e92f1a31018e6dc8fce35380900f022c24.zip
op-kernel-dev-a55e22e92f1a31018e6dc8fce35380900f022c24.tar.gz
netfilter: nf_tables: get rid of NFT_REG_VERDICT usage
Replace the array of registers passed to expressions by a struct nft_regs, containing the verdict as a seperate member, which aliases to the NFT_REG_VERDICT register. This is needed to seperate the verdict from the data registers completely, so their size can be changed. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/ipv4/netfilter/nft_masq_ipv4.c')
-rw-r--r--net/ipv4/netfilter/nft_masq_ipv4.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/net/ipv4/netfilter/nft_masq_ipv4.c b/net/ipv4/netfilter/nft_masq_ipv4.c
index 665de06..40e414c 100644
--- a/net/ipv4/netfilter/nft_masq_ipv4.c
+++ b/net/ipv4/netfilter/nft_masq_ipv4.c
@@ -17,20 +17,17 @@
#include <net/netfilter/ipv4/nf_nat_masquerade.h>
static void nft_masq_ipv4_eval(const struct nft_expr *expr,
- struct nft_data data[NFT_REG_MAX + 1],
+ struct nft_regs *regs,
const struct nft_pktinfo *pkt)
{
struct nft_masq *priv = nft_expr_priv(expr);
struct nf_nat_range range;
- unsigned int verdict;
memset(&range, 0, sizeof(range));
range.flags = priv->flags;
- verdict = nf_nat_masquerade_ipv4(pkt->skb, pkt->ops->hooknum,
- &range, pkt->out);
-
- data[NFT_REG_VERDICT].verdict = verdict;
+ regs->verdict.code = nf_nat_masquerade_ipv4(pkt->skb, pkt->ops->hooknum,
+ &range, pkt->out);
}
static struct nft_expr_type nft_masq_ipv4_type;
OpenPOWER on IntegriCloud