mcast: fix leaked igmp packets on multicast cleanup

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.

Reviewed by:	glebius
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D43033
This commit is contained in:
Kristof Provost 2023-12-13 13:32:08 +01:00 committed by Franco Fichtner
parent 48570316b7
commit e81800f6a8

View file

@ -1181,6 +1181,7 @@ inm_purge(struct in_multi *inm)
free(ims, M_IPMSOURCE);
inm->inm_nsrc--;
}
mbufq_drain(&inm->inm_scq);
}
/*