On 26.01.2011 22:22, Joerg Goltermann wrote:
we have setup a bridge with vether0 and run the standard dhcpd attached
to vether0. After a short time of usage I noticed that the system is
running out of mbuf clusters.
It looks like this setup is leaking mbuf's. Each bootp request which
is forwarded via the bridge - vether0 to the dhcpd leaks one mbuf.
If the dhcpd is *not* running, the leaking stops immediately.
This occurs under 4.8 and current. I can reproduce this behavior on
two systems.
I was starring about 4 hours on the bridge / vether / udp_input code but
can not find the leak.
Any hints which functions/code should be inspected deeply to find the leak?
I think i got it, maybe we should replace some more m_free()'s
with m_freem()'s?
OK?
- Joerg
Index: if_ethersubr.c
===================================================================
RCS file: /cvs/src/sys/net/if_ethersubr.c,v
retrieving revision 1.147
diff -u -p -r1.147 if_ethersubr.c
--- if_ethersubr.c 11 Oct 2010 11:31:14 -0000 1.147
+++ if_ethersubr.c 27 Jan 2011 15:24:26 -0000
@@ -670,7 +670,7 @@ ether_input(ifp0, eh, m)
* If packet has been filtered by the bpf listener, drop it now
*/
if (m->m_flags & M_FILDROP) {
- m_free(m);
+ m_freem(m);
return;
}