summaryrefslogtreecommitdiffstats
path: root/iptables/nft-shared.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2018-05-08 09:41:47 +0200
committerFlorian Westphal <fw@strlen.de>2018-05-10 02:31:05 +0200
commit0ae81d09c93a6c27573ae561f2af09153a5f3e51 (patch)
treed737e5deb49aa62cde09959f5b726db5f8d20fe0 /iptables/nft-shared.c
parent651cfee91a8f42336b9d794c838b9f4f480308c9 (diff)
xtables-compat: ebtables: kill ebtables_command_state
Use iptables_command_state instead. This allows to re-use code from the ip(6)tables layer and reduces cop&pasted code. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'iptables/nft-shared.c')
-rw-r--r--iptables/nft-shared.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/iptables/nft-shared.c b/iptables/nft-shared.c
index ecc54024..76fd8e49 100644
--- a/iptables/nft-shared.c
+++ b/iptables/nft-shared.c
@@ -294,11 +294,10 @@ static void *nft_get_data(struct nft_xt_ctx *ctx)
switch(ctx->family) {
case NFPROTO_IPV4:
case NFPROTO_IPV6:
+ case NFPROTO_BRIDGE:
return ctx->state.cs;
case NFPROTO_ARP:
return ctx->state.cs_arp;
- case NFPROTO_BRIDGE:
- return ctx->state.cs_eb;
default:
/* Should not happen */
return NULL;
@@ -351,10 +350,8 @@ void nft_parse_match(struct nft_xt_ctx *ctx, struct nftnl_expr *e)
switch (ctx->family) {
case NFPROTO_IPV4:
case NFPROTO_IPV6:
- matches = &ctx->state.cs->matches;
- break;
case NFPROTO_BRIDGE:
- matches = &ctx->state.cs_eb->matches;
+ matches = &ctx->state.cs->matches;
break;
default:
fprintf(stderr, "BUG: nft_parse_match() unknown family %d\n",