From 0ae81d09c93a6c27573ae561f2af09153a5f3e51 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Tue, 8 May 2018 09:41:47 +0200 Subject: 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 --- iptables/nft-shared.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'iptables/nft-shared.c') 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", -- cgit v1.2.3