I'm debugging a masq module for ipchains (kernel 2.2.23).  It appears to
work fine under normal load.  However, I noticed that the free memory
reported by free(1) starts decreasing after a couple thousand connections
are active.  The memory starts decreasing when this message starts showing
up in syslog:

kernel: IP_MASQ:ip_masq_new(proto=UDP): could not get free masq entry (free=36862).

The memory never gets reclaimed, even after the module is unloaded.

Looking through the code for ip_masq_new(), it seems that the memory
allocated for the masq struct is properly freed if a free port cannot be
found.  My module does not allocate any memory at all (except in the
initialization routine, of course).

Any ideas?

Attachment: msg01813/pgp00000.pgp
Description: PGP signature

Reply via email to