aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/netfilter/ebtable_nat.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2021-10-11 17:15:14 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2021-10-14 23:06:53 +0200
commitf0d6764f7ddbf6d57302155b0f83eadb25ab0f0c (patch)
tree247c16aa024ed85336036859472598eac2341dde /net/bridge/netfilter/ebtable_nat.c
parentnetfilter: ip6tables: allow use of ip6t_do_table as hookfn (diff)
downloadlinux-dev-f0d6764f7ddbf6d57302155b0f83eadb25ab0f0c.tar.xz
linux-dev-f0d6764f7ddbf6d57302155b0f83eadb25ab0f0c.zip
netfilter: ebtables: allow use of ebt_do_table as hookfn
This is possible now that the xt_table structure is passed via *priv. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/bridge/netfilter/ebtable_nat.c')
-rw-r--r--net/bridge/netfilter/ebtable_nat.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/net/bridge/netfilter/ebtable_nat.c b/net/bridge/netfilter/ebtable_nat.c
index 4078151c224f..5ee0531ae506 100644
--- a/net/bridge/netfilter/ebtable_nat.c
+++ b/net/bridge/netfilter/ebtable_nat.c
@@ -58,27 +58,21 @@ static const struct ebt_table frame_nat = {
.me = THIS_MODULE,
};
-static unsigned int ebt_nat_hook(void *priv, struct sk_buff *skb,
- const struct nf_hook_state *state)
-{
- return ebt_do_table(skb, state, priv);
-}
-
static const struct nf_hook_ops ebt_ops_nat[] = {
{
- .hook = ebt_nat_hook,
+ .hook = ebt_do_table,
.pf = NFPROTO_BRIDGE,
.hooknum = NF_BR_LOCAL_OUT,
.priority = NF_BR_PRI_NAT_DST_OTHER,
},
{
- .hook = ebt_nat_hook,
+ .hook = ebt_do_table,
.pf = NFPROTO_BRIDGE,
.hooknum = NF_BR_POST_ROUTING,
.priority = NF_BR_PRI_NAT_SRC,
},
{
- .hook = ebt_nat_hook,
+ .hook = ebt_do_table,
.pf = NFPROTO_BRIDGE,
.hooknum = NF_BR_PRE_ROUTING,
.priority = NF_BR_PRI_NAT_DST_BRIDGED,