netdev
[Top] [All Lists]

Re: Incorrect sch_ingress registration to NF

To: jamal <hadi@xxxxxxxxxx>
Subject: Re: Incorrect sch_ingress registration to NF
From: Julian Anastasov <ja@xxxxxx>
Date: Thu, 27 Sep 2001 01:27:04 +0000 (GMT)
Cc: "David S. Miller" <davem@xxxxxxxxxx>, <netdev@xxxxxxxxxxx>
In-reply-to: <Pine.GSO.4.30.0109261742350.6825-100000@xxxxxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
        Hello,

On Wed, 26 Sep 2001, jamal wrote:

> I cant think of any clever way that wont have a cost to it. One way could
> be just to get rid of the new define in the patch (means modules will have
> this extra static variable they dont use).

        I vote for the above variant. The counter will allow the
change from 1 to 0 to unregister the hook. When the counter is 0
the packet processing will not be delayed. IMO, init_module and
cleanup_module better not to play with netfilter. The hook will be
managed only from ingress_init and ingress_destroy without depending
on the MODULE define.

> OTOH, we could fix this from netfilter. I remember discussing this with
> Harald and sending him a small patchlet. I hope he's on the list.
> The check if (nf_register_hook(&ing_ops) < 0) is basically useless.
> The return is always succesful. Adding the same hook twice does not make
> any semantic sense in netfilter and as can be seen creates a oops.
> If nf_register_hook() returns something like -EREGISTERED life would be
> good.

        But may be this variant is not good if we want to unregister the
hook when it is not used.

> cheers,
> jamal

Regards

--
Julian Anastasov <ja@xxxxxx>


<Prev in Thread] Current Thread [Next in Thread>