svn commit: r274181 - stable/9/sys/netinet6

Andrey V. Elsukov ae at FreeBSD.org
Thu Nov 6 16:31:49 UTC 2014


Author: ae
Date: Thu Nov  6 16:31:48 2014
New Revision: 274181
URL: https://svnweb.freebsd.org/changeset/base/274181

Log:
  MFC r273855:
    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 r273857:
    Move ifq drain into in6m_purge().
  
    Suggested by:	bms
  Sponsored by:	Yandex LLC

Modified:
  stable/9/sys/netinet6/in6_mcast.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/netinet6/in6_mcast.c
==============================================================================
--- stable/9/sys/netinet6/in6_mcast.c	Thu Nov  6 16:19:21 2014	(r274180)
+++ stable/9/sys/netinet6/in6_mcast.c	Thu Nov  6 16:31:48 2014	(r274181)
@@ -1075,6 +1075,8 @@ in6m_purge(struct in6_multi *inm)
 		free(ims, M_IP6MSOURCE);
 		inm->in6m_nsrc--;
 	}
+	/* Free state-change requests that might be queued. */
+	_IF_DRAIN(&inm->in6m_scq);
 }
 
 /*


More information about the svn-src-stable-9 mailing list