Fix mbuf leak in IPv6 multicast code.

When multicast capable interface goes away, it leaves multicast groups,
this leads to generate MLD reports, but MLD code does deffered send and
MLD reports are queued in the in6_multi's in6m_scq ifq. The problem is
that in6_multi structures are freed when interface leaves multicast groups
and thread that does deffered send will not take these queued packets.

PR:		194577
MFC after:	1 week
Sponsored by:	Yandex LLC
This commit is contained in:
Andrey V. Elsukov 2014-10-30 10:59:57 +00:00
parent 62bf353355
commit 8ff1eae10d

View File

@ -526,6 +526,9 @@ in6m_release_locked(struct in6_multi *inm)
in6m_purge(inm);
/* Free state-change requests that might be queued. */
_IF_DRAIN(&inm->in6m_scq);
free(inm, M_IP6MADDR);
if_delmulti_ifma(ifma);