why not __MOD_DEC_USE_COUNT when we register match failer?
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;
------------------------------------------------
Quoted 8 lines · lepton
in
ipt_state.c(andipt_helper.c)There is such code in init funciton
-------------------------------------------
/* NULL ifip_conntracknot a module */
if (ip_conntrack_module)__MOD_INC_USE_COUNT(ip_conntrack_module);
return
Quoted 5 lines
ipt_register_match(&state_match);-------------------------------------------
I think if
ipt_register_matchfailed for some reason, the use count ofip_conntrack_modulewill increase. Is it not a bug?
yes, I agree.
Quoted 1 line
I thinks perhaps we should use such code:
Would you mind preparing a patch for those fixes?
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