diff options
author | Phil Sutter <phil@nwl.cc> | 2022-03-01 18:59:31 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2022-03-10 17:38:15 +0100 |
commit | b5f2faea325a315bfb932ebc634f3298d4824cae (patch) | |
tree | 62ae892c17a740836aa89cd99fac7ea0688be030 /iptables/nft-bridge.c | |
parent | 17534cb18ed0a5052dc45c117401251359dba6aa (diff) |
nft: Simplify immediate parsing
Implementations of parse_immediate callback are mostly trivial, the only
relevant part is access to family-specific parts of struct
iptables_command_state when setting goto flag for iptables and
ip6tables. Refactor them into simple set_goto_flag callbacks.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'iptables/nft-bridge.c')
-rw-r--r-- | iptables/nft-bridge.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/iptables/nft-bridge.c b/iptables/nft-bridge.c index 90d55e44..d6a0d6e5 100644 --- a/iptables/nft-bridge.c +++ b/iptables/nft-bridge.c @@ -251,14 +251,6 @@ static void nft_bridge_parse_payload(struct nft_xt_ctx *ctx, } } -static void nft_bridge_parse_immediate(const char *jumpto, bool nft_goto, - void *data) -{ - struct iptables_command_state *cs = data; - - cs->jumpto = jumpto; -} - /* return 0 if saddr, 1 if daddr, -1 on error */ static int lookup_check_ether_payload(uint32_t base, uint32_t offset, uint32_t len) @@ -891,7 +883,6 @@ struct nft_family_ops nft_family_ops_bridge = { .print_payload = NULL, .parse_meta = nft_bridge_parse_meta, .parse_payload = nft_bridge_parse_payload, - .parse_immediate = nft_bridge_parse_immediate, .parse_lookup = nft_bridge_parse_lookup, .parse_match = nft_bridge_parse_match, .parse_target = nft_bridge_parse_target, |