Re: [netfilter-core] strict rejection of init -> core references causes problems

Harald Welte
2004-07-09T18:52:37Z

[-- Attachment #1: Type: text/plain, Size: 1087 bytes --]

On Fri, Jul 09, 2004 at 11:36:35AM -0700, David Mosberger wrote:

> We don't have much of a choice, but I think it would be worthwhile to
> consider whether netfilter could avoid doing this in the future. It
> really is very easy to make a mistake when allowing core->init calls.

well, all we do is:

1) have a common init and de-init function
2) call it from a wrapper funcion declared as module_init()
3) call it from a wrapper function declared __exit as module_exit()

Since 1) is called from init and fini, we cannot declare it as __init
(this would remove it from ram).

So what really happens is: calls from init to 'core' functions and calls
from 'exit' to core functions.

> --david

--
- Harald Welte <laforge@netfilter.org> http://www.netfilter.org/
============================================================================
"Fragmentation is like classful addressing -- an interesting early
architectural error that shows how much experimentation was going
on while IP was being designed." -- Paul Vixie

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]