Page MenuHomeFreeBSD

mcast: fix leaked igmp packets on multicast cleanup
ClosedPublic

Authored by kp on Dec 13 2023, 1:01 PM.
Tags
None
Referenced Files
F83342426: D43033.id131458.diff
Thu, May 9, 3:35 AM
F83340816: D43033.id131458.diff
Thu, May 9, 2:54 AM
F83308592: D43033.id.diff
Wed, May 8, 5:14 PM
F83308573: D43033.id131445.diff
Wed, May 8, 5:14 PM
F83308560: D43033.id131458.diff
Wed, May 8, 5:13 PM
F83294613: D43033.id131327.diff
Wed, May 8, 1:14 PM
Unknown Object (File)
Tue, May 7, 2:34 PM
Unknown Object (File)
Tue, May 7, 4:39 AM

Details

Summary

When we release a multicast address (e.g. on interface shutdown) we may
still have packets queued in inm_scq. We have to free those, or we'll
leak memory.

Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Isn't IPv6 part affected too?

Move mbufq_drain() to the same place as in the IPv6 code.

In D43033#981649, @ae wrote:

Isn't IPv6 part affected too?

So that's an interesting point. It turns out that it's not, because in in6m_purge() we do call mbufq_drain(&inm->in6m_scq);.
I've moved my change to match what we do in IPv6.

This revision is now accepted and ready to land.Dec 14 2023, 5:29 PM