Re: [PATCH 021/103] netfilter: xtables: consolidate table hook functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jan Engelhardt wrote:
> For a following patch in this series, we will be requiring that a
> single hook function per table does the processing.

Which one?

> diff --git a/net/ipv4/netfilter/arptable_filter.c b/net/ipv4/netfilter/arptable_filter.c
> index 87ecd3e..e46123e 100644
> --- a/net/ipv4/netfilter/arptable_filter.c
> +++ b/net/ipv4/netfilter/arptable_filter.c
> @@ -53,43 +53,38 @@ static struct xt_table packet_filter = {
>  };
>  
>  /* The work comes in here from netfilter.c */
> -static unsigned int arpt_in_hook(unsigned int hook,
> +static unsigned int arptable_filter_hook(unsigned int hook,
>  				 struct sk_buff *skb,
>  				 const struct net_device *in,
>  				 const struct net_device *out,
>  				 int (*okfn)(struct sk_buff *))
>  {
> -	return arpt_do_table(skb, hook, in, out,
> -			     dev_net(in)->ipv4.arptable_filter);
> -}
> +	if (hook == NF_ARP_OUT)
> +		return arpt_do_table(skb, hook, in, out,
> +		       dev_net(out)->ipv4.arptable_filter);

I have to say, I really dislike this strange formatting style (I
think its an emacs thing, you're not the only one doing this).
The arguments are all neatly aligned so far, please keep it that
way.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux