| #
cba9f881
|
| 23-Jan-2026 |
Gleb Smirnoff <glebius@FreeBSD.org> |
netinet6: embed struct mld_ifsoftc into struct in6_ifextra
In mld_domifdetach() don't search the global list.
Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D54727
|
| #
0d469d23
|
| 18-Dec-2025 |
Gleb Smirnoff <glebius@FreeBSD.org> |
net: attach IPv4 and IPv6 stacks to an interface with EVENTHANDLER(9)
This change retires two historic relics: the if_afdata[] array and the dom_ifattach/dom_ifdetach methods.
The if_afdata[] array
net: attach IPv4 and IPv6 stacks to an interface with EVENTHANDLER(9)
This change retires two historic relics: the if_afdata[] array and the dom_ifattach/dom_ifdetach methods.
The if_afdata[] array is a relic of the era, when there was expectation that many transport protocols will coexist with IP, e.g. IPX or NetAtalk. The array hasn't had any members except AF_INET and AF_INET6 for over a decade already. This change removes the array and just leaves two pointer fields: if_inet and if_inet6.
The dom_ifattach/dom_ifdetach predates the EVENTHANDLER(9) framework and was a good enough method to initialize protocol contexts back then. Today there is no good reason to treat IPv4 and IPv6 stacks differently to other protocols/features that attach and detach from an interface.
The locking of if_afdata[] is a relic of SMPng times, when the system startup and the interface attach was even more convoluted than before this change, and we also had unloadable protocols that used a field in if_afdata[]. Note that IPv4 and IPv6 are not unloadable.
Note that this change removes NET_EPOCH_WAIT() from the interface detach sequence. This may surface several new races associated with interface removal. I failed to hit any with consecutive test suite runs, though. The expected general race scenario is that while struct ifnet is freed with proper epoch_call(9) itself, some structures hanging off ifnet are freed with direct free(9). The proper fix is either make if_foo point at some static "dead" structure providing SMP visibility of this store, or free those structure with epoch_call(9). All of these cases are planned to be found and resolved during 16.0-CURRENT lifetime.
Reviewed by: zlei, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D54089
show more ...
|
| #
95ee2897
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
| #
b730de8b
|
| 17-Aug-2022 |
Gleb Smirnoff <glebius@FreeBSD.org> |
mld6: use callout(9) directly instead of pr_slowtimo, pr_fasttimo
While here remove recursive network epoch entry in mld_fasttimo_vnet(), as this function is already in epoch.
Reviewed by: melifar
mld6: use callout(9) directly instead of pr_slowtimo, pr_fasttimo
While here remove recursive network epoch entry in mld_fasttimo_vnet(), as this function is already in epoch.
Reviewed by: melifaro Differential revision: https://reviews.freebsd.org/D36161
show more ...
|
| #
32af08ec
|
| 18-Nov-2019 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
icmpv6: Fix mbuf change in mld
After r354748 mld_input() can change the mbuf. The new pointer is never returned to icmp6_input() and when passed to icmp6_rip6_input() the mbuf may no longer valid l
icmpv6: Fix mbuf change in mld
After r354748 mld_input() can change the mbuf. The new pointer is never returned to icmp6_input() and when passed to icmp6_rip6_input() the mbuf may no longer valid leading to a panic. Pass a pointer to the mbuf to mld_input() so we can return an updated version in the non-error case.
Add a test sending an MLD packet case which will trigger this bug.
Pointyhat to: bz Reported by: gallatin, thj MFC After: 2 weeks X-MFC with: r354748 Sponsored by: Netflix
show more ...
|
| #
7e565c55
|
| 30-Jan-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r343320 through r343570.
|
| #
2cd6ad76
|
| 24-Jan-2019 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
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 li
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
show more ...
|
| #
cba9f881
|
| 23-Jan-2026 |
Gleb Smirnoff <glebius@FreeBSD.org> |
netinet6: embed struct mld_ifsoftc into struct in6_ifextra
In mld_domifdetach() don't search the global list.
Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D54727
|
| #
0d469d23
|
| 18-Dec-2025 |
Gleb Smirnoff <glebius@FreeBSD.org> |
net: attach IPv4 and IPv6 stacks to an interface with EVENTHANDLER(9)
This change retires two historic relics: the if_afdata[] array and the dom_ifattach/dom_ifdetach methods.
The if_afdata[] array
net: attach IPv4 and IPv6 stacks to an interface with EVENTHANDLER(9)
This change retires two historic relics: the if_afdata[] array and the dom_ifattach/dom_ifdetach methods.
The if_afdata[] array is a relic of the era, when there was expectation that many transport protocols will coexist with IP, e.g. IPX or NetAtalk. The array hasn't had any members except AF_INET and AF_INET6 for over a decade already. This change removes the array and just leaves two pointer fields: if_inet and if_inet6.
The dom_ifattach/dom_ifdetach predates the EVENTHANDLER(9) framework and was a good enough method to initialize protocol contexts back then. Today there is no good reason to treat IPv4 and IPv6 stacks differently to other protocols/features that attach and detach from an interface.
The locking of if_afdata[] is a relic of SMPng times, when the system startup and the interface attach was even more convoluted than before this change, and we also had unloadable protocols that used a field in if_afdata[]. Note that IPv4 and IPv6 are not unloadable.
Note that this change removes NET_EPOCH_WAIT() from the interface detach sequence. This may surface several new races associated with interface removal. I failed to hit any with consecutive test suite runs, though. The expected general race scenario is that while struct ifnet is freed with proper epoch_call(9) itself, some structures hanging off ifnet are freed with direct free(9). The proper fix is either make if_foo point at some static "dead" structure providing SMP visibility of this store, or free those structure with epoch_call(9). All of these cases are planned to be found and resolved during 16.0-CURRENT lifetime.
Reviewed by: zlei, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D54089
show more ...
|
| #
95ee2897
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
| #
b730de8b
|
| 17-Aug-2022 |
Gleb Smirnoff <glebius@FreeBSD.org> |
mld6: use callout(9) directly instead of pr_slowtimo, pr_fasttimo
While here remove recursive network epoch entry in mld_fasttimo_vnet(), as this function is already in epoch.
Reviewed by: melifar
mld6: use callout(9) directly instead of pr_slowtimo, pr_fasttimo
While here remove recursive network epoch entry in mld_fasttimo_vnet(), as this function is already in epoch.
Reviewed by: melifaro Differential revision: https://reviews.freebsd.org/D36161
show more ...
|
| #
32af08ec
|
| 18-Nov-2019 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
icmpv6: Fix mbuf change in mld
After r354748 mld_input() can change the mbuf. The new pointer is never returned to icmp6_input() and when passed to icmp6_rip6_input() the mbuf may no longer valid l
icmpv6: Fix mbuf change in mld
After r354748 mld_input() can change the mbuf. The new pointer is never returned to icmp6_input() and when passed to icmp6_rip6_input() the mbuf may no longer valid leading to a panic. Pass a pointer to the mbuf to mld_input() so we can return an updated version in the non-error case.
Add a test sending an MLD packet case which will trigger this bug.
Pointyhat to: bz Reported by: gallatin, thj MFC After: 2 weeks X-MFC with: r354748 Sponsored by: Netflix
show more ...
|
| #
7e565c55
|
| 30-Jan-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r343320 through r343570.
|
| #
2cd6ad76
|
| 24-Jan-2019 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
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 li
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
show more ...
|
| #
f3e1324b
|
| 02-May-2018 |
Stephen Hurd <shurd@FreeBSD.org> |
Separate list manipulation locking from state change in multicast
Multicast incorrectly calls in to drivers with a mutex held causing drivers to have to go through all manner of contortions to use a
Separate list manipulation locking from state change in multicast
Multicast incorrectly calls in to drivers with a mutex held causing drivers to have to go through all manner of contortions to use a non sleepable lock. Serialize multicast updates instead.
Submitted by: mmacy <mmacy@mattmacy.io> Reviewed by: shurd, sbruno Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D14969
show more ...
|
| #
fe267a55
|
| 27-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
sys: general adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error pro
sys: general adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
No functional change intended.
show more ...
|
| #
98e0ffae
|
| 27-May-2015 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge sync of head
|
| #
e6e746bf
|
| 25-Mar-2015 |
Glen Barber <gjb@FreeBSD.org> |
MFH: r278968-r280640
Sponsored by: The FreeBSD Foundation
|
| #
fa1e92b6
|
| 04-Mar-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|
| #
072aeeb6
|
| 02-Mar-2015 |
Navdeep Parhar <np@FreeBSD.org> |
Merge r278538 through r279514.
|
| #
9b2a0d91
|
| 22-Feb-2015 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r279023 through r279162.
|
| #
9e62a5a3
|
| 19-Feb-2015 |
Gleb Smirnoff <glebius@FreeBSD.org> |
- Rename 'struct mld_ifinfo' into 'struct mld_ifsoftc', since it really represents a context. - Preserve name 'struct mld_ifinfo' for a new structure, that will be stable API between userland and
- Rename 'struct mld_ifinfo' into 'struct mld_ifsoftc', since it really represents a context. - Preserve name 'struct mld_ifinfo' for a new structure, that will be stable API between userland and kernel. - Make sysctl_mld_ifinfo() return the new 'struct mld_ifinfo', instead of old one, which had a bunch of internal kernel structures in it.
Sponsored by: Netflix Sponsored by: Nginx, Inc.
show more ...
|
| #
0d36d957
|
| 19-Feb-2015 |
Dimitry Andric <dim@FreeBSD.org> |
Merging ^/head r278916 through r279022.
|
| #
a99c84d4
|
| 19-Feb-2015 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Use new struct mbufq instead of struct ifqueue to manage packet queues in IPv6 multicast code.
Sponsored by: Netflix Sponsored by: Nginx, Inc.
|
| #
d2f946c4
|
| 07-Jan-2010 |
Bruce M Simpson <bms@FreeBSD.org> |
MFC r200871: Use ALLOW_NEW_SOURCES and BLOCK_OLD_SOURCES to signal a join or leave with SSM MLDv2 by default. This is current practice and complies with RFC 4604, as well as being required by pro
MFC r200871: Use ALLOW_NEW_SOURCES and BLOCK_OLD_SOURCES to signal a join or leave with SSM MLDv2 by default. This is current practice and complies with RFC 4604, as well as being required by production IPv6 networks in Japan. The behaviour may be disabled by setting the net.inet6.mld.use_allow sysctl/tunable to 0.
Requested by: Hideki Yamamoto, dikshie
show more ...
|