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
F163064724: D43033.id131445.diff
Sun, Jul 19, 6:36 PM
F163049339: D43033.diff
Sun, Jul 19, 3:01 PM
F163049338: D43033.diff
Sun, Jul 19, 3:01 PM
Unknown Object (File)
Sat, Jul 18, 9:10 AM
Unknown Object (File)
Sat, Jun 20, 7:15 PM
Unknown Object (File)
Jun 15 2026, 2:13 AM
Unknown Object (File)
May 29 2026, 2:01 PM
Unknown Object (File)
May 27 2026, 4:35 PM

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 Skipped
Unit
Tests Skipped
Build Status
Buildable 54915
Build 51804: arc lint + arc unit

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