Difference between match and target
Hi Harald and All,
Then do Netfilter core team or Netfilter individual module authors will
think of reconsidering this policy? Like ipt_foo and ipt_FOO can be combined in one kernel module and that module will call both ipt_register_match and ipt_register_target in MODULE_INIT. In my point of view if we are inserting 2 modules then it is definitely consuming extra (some) memory of kernel. -- Sumit
Quoted 6 lines
Date: Tue, 24 Jun 2003 18:08:24 +0200
From: Harald Welte <[email protected]>Quoted 2 lines · Sumit Pandya
What is difference between writing match and target extension for
netfilter? Is there something in match which I cannot achieve in target
a=
Quoted 7 lines
nd
Quoted 1 line
vice-versa?
From a technical point of view, there is not much differrence. There are no technical restrictions, it's a mere policy:
Matches match against packet data
Targets connect some action with previously matched packets.
Quoted 3 lines · Sumit Pandya
Hi Harald and All,
Then do Netfilter core team or Netfilter individual module authors will
think of reconsidering this policy?
No, not really.
Quoted 4 lines
Like
ipt_fooandipt_FOOcan be combined in one kernel module and that module will call bothipt_register_matchandipt_register_targetinMODULE_INIT. In my point of view if we are inserting 2 modules then it is definitely consuming extra (some) memory of kernel.
yes, every module consumes at least one page (4k on x86). So if you want to save that memory (and even more, by skipping the __exit functions), statically link it into the kernel rather than using a module.
btw: you can do this now (having match and target in one kernel module, registering as match and target - but this would break iptables module-on-demand-loading code). Where should iptables know from, that when the user specifies '-m foo' it should load a kernel module called 'ipt_BAR.o' ?
Quoted 1 line
-- Sumit
Signature · 5 lines
- Harald Welte <[email protected]> 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
Quoted 5 lines · --On 25 June 2003 11:10 +0200 Harald Welte <[email protected]> wrote:
btw: you can do this now (having match and target in one kernel module, registering as match and target - but this would break iptables module-on-demand-loading code). Where should iptables know from, that when the user specifies '-m foo' it should load a kernel module called 'ipt_BAR.o' ?
I guess we could say that this could be placed in the modules configuration. Are not aliases in modules.conf used for exactly this kind of thing for instance when probing for eth0? That said it would add a significant maintenance overhead to keep the netfilter specific aliases in sync with the kernel. Given that if you care about 1 page you likely should not be using modules anyhow its likely not worth the effort.
Cheers.
-apw