[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20150407.120122.1683603489877737371.davem@davemloft.net>
Date: Tue, 07 Apr 2015 12:01:22 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: pablo@...filter.org
Cc: hannes@...essinduktion.org, netdev@...r.kernel.org,
netfilter-devel@...r.kernel.org, jiri@...nulli.us
Subject: Re: [PATCH 3/4] netfilter: Pass socket pointer down through okfn().
From: Pablo Neira Ayuso <pablo@...filter.org>
Date: Tue, 7 Apr 2015 17:35:33 +0200
> On Tue, Apr 07, 2015 at 04:44:29PM +0200, Hannes Frederic Sowa wrote:
>> On So, 2015-04-05 at 22:19 -0400, David Miller wrote:
>> > --- a/include/linux/netfilter.h
>> > +++ b/include/linux/netfilter.h
>> > @@ -54,7 +54,7 @@ struct nf_hook_state {
>> > struct net_device *in;
>> > struct net_device *out;
>> > struct sock *sk;
>> > - int (*okfn)(struct sk_buff *);
>> > + int (*okfn)(struct sock *, struct sk_buff *);
>> > };
>>
>> If we give okfn the signature int (*okfn)(struct nf_hook_state *); then
>> we would not need to touch anything else to enhance this.
>>
>> What do you think?
>
> I guess you mean something like:
>
> int (*okfn)(struct sk_buff *, struct nf_hook_state *);
>
> I agree that would save us from more changes on the okfn() signature.
> I think it's OK if that change is introduced once we have some client
> code that needs it, I mean in a follow up patch.
No, becuase this means things like ip_finish_output(), and even
generic functions like dst_output(), dev_loopback_xmit(), and friends
will have netfilter specific arguments, and that is not acceptable.
Please do not suggest this.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists