svn commit: r273855 - head/sys/netinet6
Andrey V. Elsukov
ae at FreeBSD.org
Thu Oct 30 10:59:58 UTC 2014
Author: ae
Date: Thu Oct 30 10:59:57 2014
New Revision: 273855
URL: https://svnweb.freebsd.org/changeset/base/273855
Log:
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
Modified:
head/sys/netinet6/in6_mcast.c
Modified: head/sys/netinet6/in6_mcast.c
==============================================================================
--- head/sys/netinet6/in6_mcast.c Thu Oct 30 10:56:38 2014 (r273854)
+++ head/sys/netinet6/in6_mcast.c Thu Oct 30 10:59:57 2014 (r273855)
@@ -526,6 +526,9 @@ in6m_release_locked(struct in6_multi *in
in6m_purge(inm);
+ /* Free state-change requests that might be queued. */
+ _IF_DRAIN(&inm->in6m_scq);
+
free(inm, M_IP6MADDR);
if_delmulti_ifma(ifma);
More information about the svn-src-all
mailing list