freebsd-dev/sys/netinet6
Hans Petter Selasky 2cd6ad766e Fix refcounting leaks in IPv6 MLD code leading to loss of IPv6
connectivity.

Looking at past changes in this area like r337866, some refcounting
bugs have been introduced, one by one. For example like calling
in6m_disconnect() and in6m_rele_locked() in mld_v1_process_group_timer()
where previously no disconnect nor refcount decrement was done.
Calling in6m_disconnect() when it shouldn't causes IPv6 solitation to no
longer work, because all the multicast addresses receiving the solitation
messages are now deleted from the network interface.

This patch reverts some recent changes while improving the MLD
refcounting and concurrency model after the MLD code was converted
to using EPOCH(9).

List changes:
- All CK_STAILQ_FOREACH() macros are now properly enclosed into
  EPOCH(9) sections. This simplifies assertion of locking inside
  in6m_ifmultiaddr_get_inm().
- Corrected bad use of in6m_disconnect() leading to loss of IPv6
  connectivity for MLD v1.
- Factored out checks for valid inm structure into
  in6m_ifmultiaddr_get_inm().

PR:			233535
Differential Revision:	https://reviews.freebsd.org/D18887
Reviewed by:		bz (net)
Tested by:		ae
MFC after:		1 week
Sponsored by:		Mellanox Technologies
2019-01-24 08:34:13 +00:00
..
dest6.c
frag6.c
icmp6.c Mechanical cleanup of epoch(9) usage in network stack. 2019-01-09 01:11:19 +00:00
icmp6.h
in6_cksum.c
in6_fib.c
in6_fib.h
in6_gif.c
in6_ifattach.c Fix refcounting leaks in IPv6 MLD code leading to loss of IPv6 2019-01-24 08:34:13 +00:00
in6_ifattach.h
in6_jail.c
in6_mcast.c Fix refcounting leaks in IPv6 MLD code leading to loss of IPv6 2019-01-24 08:34:13 +00:00
in6_pcb.c Mechanical cleanup of epoch(9) usage in network stack. 2019-01-09 01:11:19 +00:00
in6_pcb.h
in6_pcbgroup.c
in6_proto.c
in6_rmx.c
in6_rss.c
in6_rss.h
in6_src.c
in6_var.h Fix refcounting leaks in IPv6 MLD code leading to loss of IPv6 2019-01-24 08:34:13 +00:00
in6.c Style. 2019-01-23 22:19:49 +00:00
in6.h
ip6_ecn.h
ip6_fastfwd.c
ip6_forward.c
ip6_gre.c
ip6_id.c
ip6_input.c
ip6_mroute.c Plug some networking sysctl leaks. 2018-11-22 20:49:41 +00:00
ip6_mroute.h
ip6_output.c Fix loopback traffic when using non-lo0 link local IPv6 addresses. 2019-01-09 14:28:08 +00:00
ip6_var.h
ip6.h
ip6protosw.h
ip_fw_nat64.h
ip_fw_nptv6.h Add ability to use dynamic external prefix in ipfw_nptv6 module. 2018-11-12 11:20:59 +00:00
mld6_var.h Fix refcounting leaks in IPv6 MLD code leading to loss of IPv6 2019-01-24 08:34:13 +00:00
mld6.c Fix refcounting leaks in IPv6 MLD code leading to loss of IPv6 2019-01-24 08:34:13 +00:00
mld6.h
nd6_nbr.c Mechanical cleanup of epoch(9) usage in network stack. 2019-01-09 01:11:19 +00:00
nd6_rtr.c Mechanical cleanup of epoch(9) usage in network stack. 2019-01-09 01:11:19 +00:00
nd6.c Mechanical cleanup of epoch(9) usage in network stack. 2019-01-09 01:11:19 +00:00
nd6.h Initial implementation of draft-ietf-6man-ipv6only-flag. 2018-10-30 20:08:48 +00:00
pim6_var.h
pim6.h
raw_ip6.c Mechanical cleanup of epoch(9) usage in network stack. 2019-01-09 01:11:19 +00:00
raw_ip6.h
route6.c
scope6_var.h
scope6.c Mechanical cleanup of epoch(9) usage in network stack. 2019-01-09 01:11:19 +00:00
sctp6_usrreq.c
sctp6_var.h
send.c
send.h
tcp6_var.h
udp6_usrreq.c
udp6_var.h