* why not __MOD_DEC_USE_COUNT when we register match failer?
@ 2004-01-13 4:12 lepton
2004-01-21 13:47 ` Harald Welte
0 siblings, 1 reply; 2+ messages in thread
From: lepton @ 2004-01-13 4:12 UTC (permalink / raw)
To: netfilter-devel
in ipt_state.c (and ipt_helper.c)
There is such code in init funciton
-------------------------------------------
/* NULL if ip_conntrack not a module */
if (ip_conntrack_module)
__MOD_INC_USE_COUNT(ip_conntrack_module);
return
ipt_register_match(&state_match);
-------------------------------------------
I think if ipt_register_match failed for some reason, the use count of
ip_conntrack_module will increase. Is it not a bug?
I thinks perhaps we should use such code:
------------------------------------------------
int ret;
/* NULL if ip_conntrack not a module */
if (ip_conntrack_module)
__MOD_INC_USE_COUNT(ip_conntrack_module);
ret=ipt_register_match(&state_match);
if(ret)
__MOD_DEC_USE_COUNT(ip_conntrack_module);
return ret;
------------------------------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: why not __MOD_DEC_USE_COUNT when we register match failer?
2004-01-13 4:12 why not __MOD_DEC_USE_COUNT when we register match failer? lepton
@ 2004-01-21 13:47 ` Harald Welte
0 siblings, 0 replies; 2+ messages in thread
From: Harald Welte @ 2004-01-21 13:47 UTC (permalink / raw)
To: lepton; +Cc: netfilter-devel
[-- Attachment #1: Type: text/plain, Size: 1019 bytes --]
On Tue, Jan 13, 2004 at 12:12:48PM +0800, lepton wrote:
> in ipt_state.c (and ipt_helper.c)
>
> There is such code in init funciton
> -------------------------------------------
> /* NULL if ip_conntrack not a module */
> if (ip_conntrack_module)
> __MOD_INC_USE_COUNT(ip_conntrack_module);
> return
> ipt_register_match(&state_match);
> -------------------------------------------
>
> I think if ipt_register_match failed for some reason, the use count of
> ip_conntrack_module will increase. Is it not a bug?
yes, I agree.
> I thinks perhaps we should use such code:
Would you mind preparing a patch for those fixes?
--
- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-01-21 13:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-13 4:12 why not __MOD_DEC_USE_COUNT when we register match failer? lepton
2004-01-21 13:47 ` Harald Welte
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.