diff options
author | Eric W. Biederman | 2015-09-18 21:32:54 +0200 |
---|---|---|
committer | Pablo Neira Ayuso | 2015-09-18 21:57:35 +0200 |
commit | 97b59c3a91d5ee4777658ff2136d1fdf13bd23d0 (patch) | |
tree | 03be4e5ff9d2217643b2bf2f4324ba3555acdf92 /net/bridge/netfilter/ebtable_filter.c | |
parent | Merge tag 'ipvs-for-v4.4' of https://git.kernel.org/pub/scm/linux/kernel/git/... (diff) | |
download | kernel-qcow2-linux-97b59c3a91d5ee4777658ff2136d1fdf13bd23d0.tar.gz kernel-qcow2-linux-97b59c3a91d5ee4777658ff2136d1fdf13bd23d0.tar.xz kernel-qcow2-linux-97b59c3a91d5ee4777658ff2136d1fdf13bd23d0.zip |
netfilter: ebtables: Simplify the arguments to ebt_do_table
Nearly everything thing of interest to ebt_do_table is already present
in nf_hook_state. Simplify ebt_do_table by just passing in the skb,
nf_hook_state, and the table. This make the code easier to read and
maintenance easier.
To support this create an nf_hook_state on the stack in ebt_broute
(the only caller without a nf_hook_state already available). This new
nf_hook_state adds no new computations to ebt_broute, but does use a
few more bytes of stack.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/bridge/netfilter/ebtable_filter.c')
-rw-r--r-- | net/bridge/netfilter/ebtable_filter.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/bridge/netfilter/ebtable_filter.c b/net/bridge/netfilter/ebtable_filter.c index ab20d6ed6e2f..118ce40ac181 100644 --- a/net/bridge/netfilter/ebtable_filter.c +++ b/net/bridge/netfilter/ebtable_filter.c @@ -60,16 +60,14 @@ static unsigned int ebt_in_hook(const struct nf_hook_ops *ops, struct sk_buff *skb, const struct nf_hook_state *state) { - return ebt_do_table(ops->hooknum, skb, state->in, state->out, - state->net->xt.frame_filter); + return ebt_do_table(skb, state, state->net->xt.frame_filter); } static unsigned int ebt_out_hook(const struct nf_hook_ops *ops, struct sk_buff *skb, const struct nf_hook_state *state) { - return ebt_do_table(ops->hooknum, skb, state->in, state->out, - state->net->xt.frame_filter); + return ebt_do_table(skb, state, state->net->xt.frame_filter); } static struct nf_hook_ops ebt_ops_filter[] __read_mostly = { |