]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC 229390,229420,229479:
authorjhb <jhb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 13 Jan 2012 19:50:52 +0000 (19:50 +0000)
committerjhb <jhb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 13 Jan 2012 19:50:52 +0000 (19:50 +0000)
commitd6d5f9cb1e07bfa74eea9d05648922d696e5bb81
tree58c7c40dc05be1f88d22feb7849cc603ebc1ff8c
parentdda59848f1e56f15420fbc47a51a1a69b64b82b7
MFC 229390,229420,229479:
Fix some races in the multicast code by removing places where we would
drop the IF_ADDR_LOCK while walking an interface's multicast address list:
- Use TAILQ_FOREACH() instead of TAILQ_FOREACH_SAFE() for some loops that
  do not modify the queues they iterate over.
- When cancelling multicast timers on an interface, don't release the
  reference on a group in the leaving state while iterating over the loop.
  Instead, use the same approach used in igmp_ifdetach() and mld_ifdetach()
  of placing the groups to free on a pending release list and then releasing
  the references after dropping the IF_ADDR_LOCK.
- Use the mli_relinmhead list normally used to defer calls to
  in6m_release_locked() to defer calls to mld_v1_transmit_report() until
  after the IF_ADDR_LOCK is dropped.

git-svn-id: svn://svn.freebsd.org/base/stable/9@230076 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/netinet/igmp.c
sys/netinet6/in6.c
sys/netinet6/mld6.c