On Mon, Mar 04, 2002 at 12:46:07AM +0100, Ignacy Gawedzki wrote: > Hi, I haven't subscribed to the list, so please reply with cc to me. > > While reading connection tracking source code I noticed something that > seems to be a bug (at least a potential one). > > In the init() function, in the file ip_conntrack_ftp.c, after each > successful registration of a helper, the counter ports_c in incremented. > This counter is declared static but is not used elsewhere in the file. I > presume it should be used in the fini() function when unregistering > previously registered helpers. Instead of unregistering ports_c helpers, > the fini() function attempts to unregister as many helpers as it > intended initially to register. But in case of a failed registration, > the init() function calls fini() to clean things up. > > The same problem is present in ip_conntrack_irc.c and ip_nat_ftp.c. The > fini() function in the ip_nat_irc.c file seems to make correct use of > ports_c, though.
Thanks, you are totally right. It's always nice to see other people are actually reading the code and detecting problems. I'll fix those issues and send a patch for kernel inclusion. > Ignacy Gawedzki -- Live long and prosper - Harald Welte / [EMAIL PROTECTED] http://www.gnumonks.org/ ============================================================================ GCS/E/IT d- s-: a-- C+++ UL++++$ P+++ L++++$ E--- W- N++ o? K- w--- O- M+ V-- PS++ PE-- Y++ PGP++ t+ 5-- !X !R tv-- b+++ !DI !D G+ e* h--- r++ y+(*)