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>
|