History log of /src/sys/netinet6/mld6.c |
Revision | | Date | Author | Comments |
1.102 |
| 05-Jun-2025 |
ozaki-r | Apply if_first_addr() and if_first_addr_psref()
|
1.101 |
| 25-Sep-2019 |
ozaki-r | Make panic messages more informative
|
1.100 |
| 22-Dec-2018 |
maxv | Replace M_ALIGN and MH_ALIGN by m_align.
|
1.99 |
| 29-May-2018 |
ozaki-r | branches: 1.99.2; Avoid double LIST_REMOVE which corrupts lists
|
1.98 |
| 29-May-2018 |
ozaki-r | Move LIST_REMOVE
mld_stoptimer releases in6_multilock temporarily, so we must LIST_REMOVE first.
|
1.97 |
| 29-May-2018 |
ozaki-r | Make a deletion of in6m in nd6_rtrequest atomic
|
1.96 |
| 29-May-2018 |
ozaki-r | Make a refcount decrement and a removal from a list of an item atomic
in6m_refcount of an in6m can be incremented if the in6m is on the list (if_multiaddrs) in in6_addmulti or mld_input. So we must avoid such an increment when we try to destroy an in6m. To this end we must make an in6m_refcount decrement and a removal of an in6m from if_multiaddrs atomic.
|
1.95 |
| 29-May-2018 |
ozaki-r | Improve atomicity of in6_leavegroup and in6_delmulti
|
1.94 |
| 29-May-2018 |
ozaki-r | Release in6_multilock on callout_halt of mld_timeo to avoid a deadlock
|
1.93 |
| 29-May-2018 |
ozaki-r | Don't hold softnet_lock in mld_timeo
Then we can get rid of remaining abuses of mutex_owned(softnet_lock).
|
1.92 |
| 01-May-2018 |
maxv | Remove now unused net_osdep.h includes, the other BSDs did the same.
|
1.91 |
| 01-Feb-2018 |
maxv | branches: 1.91.2; Style, and remove the 'len' argument from mld_allocbuf(), it is misleading, we only want a static struct. Beyond that no functional change.
|
1.90 |
| 17-Nov-2017 |
ozaki-r | Provide macros for softnet_lock and KERNEL_LOCK hiding NET_MPSAFE switch
It reduces C&P codes such as "#ifndef NET_MPSAFE KERNEL_LOCK(1, NULL); ..." scattered all over the source code and makes it easy to identify remaining KERNEL_LOCK and/or softnet_lock that are held even if NET_MPSAFE.
No functional change
|
1.89 |
| 13-May-2017 |
kardel | branches: 1.89.2; avoid a double ifa_release() and thus a panic when e. g. running ifmcstat
|
1.88 |
| 02-Mar-2017 |
ozaki-r | branches: 1.88.4; Plug a race condition on accessing i6mm_maddr
|
1.87 |
| 02-Mar-2017 |
ozaki-r | Fix racy in6m_sol
Relook up the entry instead of reusing it, which makes locking simple.
|
1.86 |
| 02-Mar-2017 |
ozaki-r | Protect ia6_memberships by in6_ifaddr_lock
|
1.85 |
| 01-Mar-2017 |
ozaki-r | Make IPv6 multicast MP-safe partially
To complete the task, we need to make users of IPv6 multicast MP-safe, for example socket/PCB and CARP.
|
1.84 |
| 01-Mar-2017 |
ozaki-r | Provide in6_multi_group
Use it when checking if we belong to the group, instead of in6_lookup_multi.
No functional change.
|
1.83 |
| 23-Feb-2017 |
ozaki-r | Remove mkludge stuffs
For unknown reasons, IPv6 multicast addresses are linked to a first IPv6 address assigned to an interface. Due to the design, when removing a first address having multicast addresses, we need to save them to somewhere and later restore them once a new IPv6 address is activated. mkludge stuffs support the operations.
This change links multicast addresses to an interface directly and throws the kludge away.
Note that as usual some obsolete member variables remain for kvm(3) users. And also sysctl net.inet6.multicast_kludge remains to avoid breaking old ifmcstat.
TODO: currently ifnet has a list of in6_multi but obviously the list should be protocol independent. Provide a common structure (if_multi or something) to handle in6_multi and in_multi together as well as ifaddr does for in_ifaddr and in6_ifaddr.
|
1.82 |
| 22-Feb-2017 |
ozaki-r | Stop using useless IN6_*_MULTI macros
|
1.81 |
| 07-Feb-2017 |
ozaki-r | Add missing NULL checks for m_get_rcvif
|
1.80 |
| 24-Jan-2017 |
ozaki-r | Tweak softnet_lock and NET_MPSAFE
- Don't hold softnet_lock in some functions if NET_MPSAFE - Add softnet_lock to sysctl_net_inet_icmp_redirtimeout - Add softnet_lock to expire_upcalls of ip_mroute.c - Restore softnet_lock for in{,6}_pcbpurgeif{,0} if NET_MPSAFE - Mark some softnet_lock for future work
|
1.79 |
| 16-Jan-2017 |
christos | ip6_sprintf -> IN6_PRINT so that we pass the size.
|
1.78 |
| 16-Jan-2017 |
ryo | Make ip6_sprintf(), in_fmtaddr(), lla_snprintf() and icmp6_redirect_diag() mpsafe.
Reviewed by ozaki-r@
|
1.77 |
| 11-Jan-2017 |
ozaki-r | branches: 1.77.2; Get rid of unnecessary header inclusions
|
1.76 |
| 10-Jan-2017 |
ozaki-r | Enable some sysctl knobs on rump kernels for ifmcstat
|
1.75 |
| 18-Nov-2016 |
knakahara | fix: "ifconfig destory" can stalls when "ifconfig" is done parallel. This problem occurs only if NET_MPSAFE on.
ifconfig destroy side: kernel entry point is ifioctl => if_clone_destroy. pr_purgeif() acquires softnet_lock, and then ifa_remove() calls pserialize_perform() holding softnet_lock. ifconfig side: kernel entry point is socreate. pr_attach()(udp_attach_wrapper()) calls sosetlock(). In this call path, sosetlock() try to acquire softnet_lock. These can cause dead lock.
|
1.74 |
| 01-Aug-2016 |
ozaki-r | Apply pserialize and psref to struct ifaddr and its variants
This change makes struct ifaddr and its variants (in_ifaddr and in6_ifaddr) MP-safe by using pserialize and psref. At this moment, pserialize_perform and psref_target_destroy are disabled because (1) we don't need them because of softnet_lock (2) they cause a deadlock because of softnet_lock. So we'll enable them when we remove softnet_lock in the future.
|
1.73 |
| 20-Jul-2016 |
ozaki-r | Apply pserialize to some iterations of IP address lists
|
1.72 |
| 08-Jul-2016 |
ozaki-r | branches: 1.72.2; Replace macros to get an IP address with proper inline functions
The inline functions are more friendly for applying psz/psref; they consist of only simple interations.
|
1.71 |
| 07-Jul-2016 |
ozaki-r | Switch the address list of intefaces to pslist(9)
As usual, we leave the old list to avoid breaking kvm(3) users.
|
1.70 |
| 04-Jul-2016 |
ozaki-r | Use pslist(9) for the global in6_ifaddr list
psz and psref will be applied in another commit.
No functional change intended.
|
1.69 |
| 22-Jun-2016 |
ozaki-r | Remove unnecessary NULL checks of ifa->ifa_addr
If it's NULL, it should be a bug. There many IFADDR_FOREACH that don't do NULL check. If it can be NULL, they should fire already.
|
1.68 |
| 21-Jun-2016 |
ozaki-r | Replace ifp of ip_moptions and ip6_moptions with if_index
The motivation is the same as the mbuf's rcvif case; avoid having a pointer of an ifnet object in ip_moptions and ip6_moptions, which is not MP-safe.
ip_moptions and ip6_moptions can be stored in a PCB for inet or inet6 that's life time is different from ifnet one and so an ifnet object can be disappeared anytime we get it via them. Thus we need to look up an ifnet object by if_index every time for safe.
|
1.67 |
| 16-Jun-2016 |
ozaki-r | Use if_get_byindex instead of if_byindex for MP-safe
|
1.66 |
| 10-Jun-2016 |
ozaki-r | Avoid storing a pointer of an interface in a mbuf
Having a pointer of an interface in a mbuf isn't safe if we remove big kernel locks; an interface object (ifnet) can be destroyed anytime in any packet processing and accessing such object via a pointer is racy. Instead we have to get an object from the interface collection (ifindex2ifnet) via an interface index (if_index) that is stored to a mbuf instead of an pointer.
The change provides two APIs: m_{get,put}_rcvif_psref that use psref(9) for sleep-able critical sections and m_{get,put}_rcvif that use pserialize(9) for other critical sections. The change also adds another API called m_get_rcvif_NOMPSAFE, that is NOT MP-safe and for transition moratorium, i.e., it is intended to be used for places where are not planned to be MP-ified soon.
The change adds some overhead due to psref to performance sensitive paths, however the overhead is not serious, 2% down at worst.
Proposed on tech-kern and tech-net.
|
1.65 |
| 10-Jun-2016 |
ozaki-r | Introduce m_set_rcvif and m_reset_rcvif
The API is used to set (or reset) a received interface of a mbuf. They are counterpart of m_get_rcvif, which will come in another commit, hide internal of rcvif operation, and reduce the diff of the upcoming change.
No functional change.
|
1.64 |
| 12-Nov-2015 |
joerg | Ensure that the callout of the multicast address is valid before hooking it up.
|
1.63 |
| 24-Aug-2015 |
pooka | sprinkle _KERNEL_OPT
|
1.62 |
| 20-Jan-2015 |
roy | Add net.inet6.ip6.prefer_tempaddr sysctl knob so that we can prefer IPv6 temporary addresses as the source address.
Fixes PR kern/47100 based on a patch by Dieter Roelants.
|
1.61 |
| 12-Nov-2014 |
ozaki-r | branches: 1.61.2; Ensure callout isn't running and pending before callout_destroy
Call callout_halt before callout_destroy. And also let callout (mld_timeo) not call callout_schedule when we already called callout_halt.
This fixes PR 47881.
|
1.60 |
| 09-Sep-2014 |
rmind | Eliminate IFAREF() and IFAFREE() macros in favour of functions.
|
1.59 |
| 26-Jul-2014 |
joerg | branches: 1.59.2; PR 49036: net.inet6 has not been created when the sysctl constructor for net.inet6.multicast is run.
|
1.58 |
| 25-Jul-2014 |
ozaki-r | Use IFADDR_FOREACH for iterating if_addrlist of ifnet
|
1.57 |
| 10-Jun-2014 |
joerg | Introduce new sysctls for obtaining interface-specific addresses: - net.sdl for the active link-layer adddress (the MAC) - net.ether.multicast for the Ethernet multicast addresses - net.inet6.multicast for the IPv6 multicast groups - net.inet6.multicast_kludge for temporarily removed multicast groups
Use this sysctls for replacing the kmem grovelling in ifmcstat(8).
|
1.56 |
| 02-Jun-2014 |
joerg | Use explicit initializer.
|
1.55 |
| 19-Nov-2011 |
tls | branches: 1.55.4; 1.55.8; 1.55.22; First step of random number subsystem rework described in <20111022023242.BA26F14A158@mail.netbsd.org>. This change includes the following:
An initial cleanup and minor reorganization of the entropy pool code in sys/dev/rnd.c and sys/dev/rndpool.c. Several bugs are fixed. Some effort is made to accumulate entropy more quickly at boot time.
A generic interface, "rndsink", is added, for stream generators to request that they be re-keyed with good quality entropy from the pool as soon as it is available.
The arc4random()/arc4randbytes() implementation in libkern is adjusted to use the rndsink interface for rekeying, which helps address the problem of low-quality keys at boot time.
An implementation of the FIPS 140-2 statistical tests for random number generator quality is provided (libkern/rngtest.c). This is based on Greg Rose's implementation from Qualcomm.
A new random stream generator, nist_ctr_drbg, is provided. It is based on an implementation of the NIST SP800-90 CTR_DRBG by Henric Jungheim. This generator users AES in a modified counter mode to generate a backtracking-resistant random stream.
An abstraction layer, "cprng", is provided for in-kernel consumers of randomness. The arc4random/arc4randbytes API is deprecated for in-kernel use. It is replaced by "cprng_strong". The current cprng_fast implementation wraps the existing arc4random implementation. The current cprng_strong implementation wraps the new CTR_DRBG implementation. Both interfaces are rekeyed from the entropy pool automatically at intervals justifiable from best current cryptographic practice.
In some quick tests, cprng_fast() is about the same speed as the old arc4randbytes(), and cprng_strong() is about 20% faster than rnd_extract_data(). Performance is expected to improve.
The AES code in src/crypto/rijndael is no longer an optional kernel component, as it is required by cprng_strong, which is not an optional kernel component.
The entropy pool output is subjected to the rngtest tests at startup time; if it fails, the system will reboot. There is approximately a 3/10000 chance of a false positive from these tests. Entropy pool _input_ from hardware random numbers is subjected to the rngtest tests at attach time, as well as the FIPS continuous-output test, to detect bad or stuck hardware RNGs; if any are detected, they are detached, but the system continues to run.
A problem with rndctl(8) is fixed -- datastructures with pointers in arrays are no longer passed to userspace (this was not a security problem, but rather a major issue for compat32). A new kernel will require a new rndctl.
The sysctl kern.arandom() and kern.urandom() nodes are hooked up to the new generators, but the /dev/*random pseudodevices are not, yet.
Manual pages for the new kernel interfaces are forthcoming.
|
1.54 |
| 19-Oct-2011 |
dyoung | branches: 1.54.2; Use if_addr_init() and if_mcast_op() instead of ifp->if_ioctl().
|
1.53 |
| 31-Aug-2011 |
plunky | NULL does not need a cast
|
1.52 |
| 21-Apr-2011 |
dholland | Prune dead assignment, from Henning Petersen in PR 44890.
|
1.51 |
| 04-Aug-2009 |
dyoung | branches: 1.51.4; 1.51.6; Use malloc(...|M_ZERO) instead of malloc(...) followed by memset(,0,).
|
1.50 |
| 18-Apr-2009 |
tsutsui | Remove extra whitespace added by a stupid tool. XXX: more in src/sys/arch
|
1.49 |
| 18-Mar-2009 |
cegger | bcopy -> memcpy
|
1.48 |
| 07-Nov-2008 |
dyoung | branches: 1.48.4; *** Summary ***
When a link-layer address changes (e.g., ifconfig ex0 link 02:de:ad:be:ef:02 active), send a gratuitous ARP and/or a Neighbor Advertisement to update the network-/link-layer address bindings on our LAN peers.
Refuse a change of ethernet address to the address 00:00:00:00:00:00 or to any multicast/broadcast address. (Thanks matt@.)
Reorder ifnet ioctl operations so that driver ioctls may inherit the functions of their "class"---ether_ioctl(), fddi_ioctl(), et cetera---and the class ioctls may inherit from the generic ioctl, ifioctl_common(), but both driver- and class-ioctls may override the generic behavior. Make network drivers share more code.
Distinguish a "factory" link-layer address from others for the purposes of both protecting that address from deletion and computing EUI64.
Return consistent, appropriate error codes from network drivers.
Improve readability. KNF.
*** Details ***
In if_attach(), always initialize the interface ioctl routine, ifnet->if_ioctl, if the driver has not already initialized it. Delete if_ioctl == NULL tests everywhere else, because it cannot happen.
In the ioctl routines of network interfaces, inherit common ioctl behaviors by calling either ifioctl_common() or whichever ioctl routine is appropriate for the class of interface---e.g., ether_ioctl() for ethernets.
Stop (ab)using SIOCSIFADDR and start to use SIOCINITIFADDR. In the user->kernel interface, SIOCSIFADDR's argument was an ifreq, but on the protocol->ifnet interface, SIOCSIFADDR's argument was an ifaddr. That was confusing, and it would work against me as I make it possible for a network interface to overload most ioctls. On the protocol->ifnet interface, replace SIOCSIFADDR with SIOCINITIFADDR. In ifioctl(), return EPERM if userland tries to invoke SIOCINITIFADDR.
In ifioctl(), give the interface the first shot at handling most interface ioctls, and give the protocol the second shot, instead of the other way around. Finally, let compatibility code (COMPAT_OSOCK) take a shot.
Pull device initialization out of switch statements under SIOCINITIFADDR. For example, pull ..._init() out of any switch statement that looks like this:
switch (...->sa_family) { case ...: ..._init(); ... break; ... default: ..._init(); ... break; }
Rewrite many if-else clauses that handle all permutations of IFF_UP and IFF_RUNNING to use a switch statement,
switch (x & (IFF_UP|IFF_RUNNING)) { case 0: ... break; case IFF_RUNNING: ... break; case IFF_UP: ... break; case IFF_UP|IFF_RUNNING: ... break; }
unifdef lots of code containing #ifdef FreeBSD, #ifdef NetBSD, and #ifdef SIOCSIFMTU, especially in fwip(4) and in ndis(4).
In ipw(4), remove an if_set_sadl() call that is out of place.
In nfe(4), reuse the jumbo MTU logic in ether_ioctl().
Let ethernets register a callback for setting h/w state such as promiscuous mode and the multicast filter in accord with a change in the if_flags: ether_set_ifflags_cb() registers a callback that returns ENETRESET if the caller should reset the ethernet by calling if_init(), 0 on success, != 0 on failure. Pull common code from ex(4), gem(4), nfe(4), sip(4), tlp(4), vge(4) into ether_ioctl(), and register if_flags callbacks for those drivers.
Return ENOTTY instead of EINVAL for inappropriate ioctls. In zyd(4), use ENXIO instead of ENOTTY to indicate that the device is not any longer attached.
Add to if_set_sadl() a boolean 'factory' argument that indicates whether a link-layer address was assigned by the factory or some other source. In a comment, recommend using the factory address for generating an EUI64, and update in6_get_hw_ifid() to prefer a factory address to any other link-layer address.
Add a routing message, RTM_LLINFO_UPD, that tells protocols to update the binding of network-layer addresses to link-layer addresses. Implement this message in IPv4 and IPv6 by sending a gratuitous ARP or a neighbor advertisement, respectively. Generate RTM_LLINFO_UPD messages on a change of an interface's link-layer address.
In ether_ioctl(), do not let SIOCALIFADDR set a link-layer address that is broadcast/multicast or equal to 00:00:00:00:00:00.
Make ether_ioctl() call ifioctl_common() to handle ioctls that it does not understand.
In gif(4), initialize if_softc and use it, instead of assuming that the gif_softc and ifp overlap.
Let ifioctl_common() handle SIOCGIFADDR.
Sprinkle rtcache_invariants(), which checks on DIAGNOSTIC kernels that certain invariants on a struct route are satisfied.
In agr(4), rewrite agr_ioctl_filter() to be a bit more explicit about the ioctls that we do not allow on an agr(4) member interface.
bzero -> memset. Delete unnecessary casts to void *. Use sockaddr_in_init() and sockaddr_in6_init(). Compare pointers with NULL instead of "testing truth". Replace some instances of (type *)0 with NULL. Change some K&R prototypes to ANSI C, and join lines.
|
1.47 |
| 22-Aug-2008 |
adrianp | branches: 1.47.2; Fix from matt@ for malformed ICMPv6 MLD query (CVE-2008-2464).
|
1.46 |
| 22-May-2008 |
dyoung | branches: 1.46.4; Don't cast to void * unnecessarily.
|
1.45 |
| 24-Apr-2008 |
ad | branches: 1.45.2; 1.45.4; Merge the socket locking patch:
- Socket layer becomes MP safe. - Unix protocols become MP safe. - Allows protocol processing interrupts to safely block on locks. - Fixes a number of race conditions.
With much feedback from matt@ and plunky@.
|
1.44 |
| 15-Apr-2008 |
thorpej | branches: 1.44.2; Make ip6 and icmp6 stats per-cpu.
|
1.43 |
| 08-Apr-2008 |
thorpej | Change ICMP6 stats from a structure to an array of uint64_t's.
Note: This is ABI-compatible with the old icmp6stat structure; old netstat binaries will continue to work properly.
|
1.42 |
| 27-Feb-2008 |
matt | Convert to ansi definitions from old-style definitons. Remember that func() is not ansi, func(void) is.
|
1.41 |
| 16-Oct-2007 |
joerg | branches: 1.41.14; 1.41.18; Inline callout_t in struct in6_multi. This fixes a number of possible memory leaks. Explicitly destroy the callout before freeing it. Use callout_setfunc/callout_schedule instead of repeating it for callout_reset.
Bump NetBSD version to 4.99.34 for kvm users.
|
1.40 |
| 31-Aug-2007 |
dyoung | branches: 1.40.2; Use sockaddr_in6_init().
|
1.39 |
| 09-Jul-2007 |
ad | branches: 1.39.2; 1.39.6; 1.39.8; Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes - select()/poll() improvements - miscellaneous MT safety improvements
|
1.38 |
| 23-May-2007 |
christos | Ansify + add a few comments, from Karl Sjödahl
|
1.37 |
| 04-Mar-2007 |
christos | branches: 1.37.2; 1.37.4; Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
|
1.36 |
| 29-Nov-2006 |
dyoung | branches: 1.36.2; 1.36.4; 1.36.8; 1.36.12; Fix a spelling error.
Annotate a memory leak.
When copying one multicast address list to another, IFAREF before IFAFREE to protect against using an ifaddr after (accidentally) freeing it.
LIST_REMOVE() a multicast address from its old list before LIST_INSERT_HEAD() on its new list.
Do not count on in6_delmulti() removing its multicast-record argument from the multicast address list that the record belongs to, because clearly that is not what it (always) does.
|
1.35 |
| 20-Nov-2006 |
dyoung | Cosmetic: use LIST_ macros. Shorten some staircases.
Defensive programming: set an in6_multi's ifaddr reference to NULL after releasing it, to protect against reuse.
|
1.34 |
| 16-Nov-2006 |
christos | __unused removal on arguments; approved by core.
|
1.33 |
| 12-Oct-2006 |
christos | - sprinkle __unused on function decls. - fix a couple of unused bugs - no more -Wno-unused for i386
|
1.32 |
| 06-Mar-2006 |
rpaulo | branches: 1.32.12; 1.32.14; Rename local variables called delay that shadow the delay() decl. Pointed out by Robert Swindells.
|
1.31 |
| 05-Mar-2006 |
rpaulo | NDP-related improvements: RFC4191 - supports host-side router-preference
RFC3542 - if DAD fails on a interface, disables IPv6 operation on the interface - don't advertise MLD report before DAD finishes
Others - fixes integer overflow for valid and preferred lifetimes - improves timer granularity for MLD, using callout-timer. - reflects rtadvd's IPv6 host variable information into kernel (router only) - adds a sysctl option to enable/disable pMTUd for multicast packets - performs NUD on PPP/GRE interface by default - Redirect works regardless of ip6_accept_rtadv - removes RFC1885-related code
From the KAME project via SUZUKI Shinsuke. Reviewed by core.
|
1.30 |
| 03-Mar-2006 |
rpaulo | branches: 1.30.2; Fix typos in comments.
From: the KAME project via SUZUKI Shinsuke.
|
1.29 |
| 21-Jan-2006 |
rpaulo | branches: 1.29.2; 1.29.4; Better support of IPv6 scoped addresses.
- most of the kernel code will not care about the actual encoding of scope zone IDs and won't touch "s6_addr16[1]" directly. - similarly, most of the kernel code will not care about link-local scoped addresses as a special case. - scope boundary check will be stricter. For example, the current *BSD code allows a packet with src=::1 and dst=(some global IPv6 address) to be sent outside of the node, if the application do: s = socket(AF_INET6); bind(s, "::1"); sendto(s, some_global_IPv6_addr); This is clearly wrong, since ::1 is only meaningful within a single node, but the current implementation of the *BSD kernel cannot reject this attempt. - and, while there, don't try to remove the ff02::/32 interface route entry in in6_ifdetach() as it's already gone.
This also includes some level of support for the standard source address selection algorithm defined in RFC3484, which will be completed on in the future.
From the KAME project via JINMEI Tatuya. Approved by core@.
|
1.28 |
| 11-Dec-2005 |
christos | branches: 1.28.2; merge ktrace-lwp.
|
1.27 |
| 26-Feb-2005 |
perry | branches: 1.27.4; nuke trailing whitespace
|
1.26 |
| 28-Mar-2004 |
christos | branches: 1.26.8; 1.26.10; no need for splsoftnet, because the caller does it already.
|
1.25 |
| 22-Aug-2003 |
itojun | change the additional arg to be passed to ip{,6}_output to struct socket *.
this fixes KAME policy lookup which was broken by the previous commit.
|
1.24 |
| 22-Aug-2003 |
jonathan | Replace the set_socket() method of passing an extra struct socket* argument to ip6_output() with a new explicit struct in6pcb* argument. (The underlying socket can be obtained via in6pcb->inp6_socket.)
In preparation for fast-ipsec. Reviewed by itojun.
|
1.23 |
| 07-Aug-2003 |
agc | Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
|
1.22 |
| 06-Jun-2003 |
itojun | branches: 1.22.2; - sync up MLD declaration with RFC3542 (s/MLD6/MLD/) - routing header declaration with RFC3542 (note: sizeof(ip6_rthdr0) has changed!) also, sync up with RFC2460 routing header definition (no "strict" source routing mode any more)
part of advanced API update (RFC2292 -> 3542).
|
1.21 |
| 14-May-2003 |
itojun | always use PULLDOWN_TEST codepath.
|
1.20 |
| 09-Jun-2002 |
itojun | whitespace cleanup
|
1.19 |
| 08-Jun-2002 |
itojun | sync with latest KAME in6_ifaddr/prefix/default router manipulation. behavior changes: - two iocts used by ndp(8) are now obsolete (backward compat provided). use sysctl path instead. - lo0 does not get ::1 automatically. it will get ::1 when lo0 comes up.
|
1.18 |
| 08-Jan-2002 |
itojun | branches: 1.18.8; 1.18.10; do not log() in per-packet input path. sync w/kame
|
1.17 |
| 18-Dec-2001 |
itojun | reduce white space/cosmetic diffs w/kame.
|
1.16 |
| 13-Nov-2001 |
lukem | add RCSIDs
|
1.15 |
| 18-Oct-2001 |
itojun | simplify per-if stats.
|
1.14 |
| 16-Oct-2001 |
itojun | more whitespace/comment sync with kame
|
1.13 |
| 10-Feb-2001 |
itojun | branches: 1.13.2; 1.13.4; to sync with kame better, (1) remove register declaration for variables, (2) sync whitespaces, (3) update comments. (4) bring in some of portability and logging enhancements. no functional changes here.
|
1.12 |
| 01-Mar-2000 |
itojun | introduce m->m_pkthdr.aux to hold random data which needs to be passed between protocol handlers.
ipsec socket pointers, ipsec decryption/auth information, tunnel decapsulation information are in my mind - there can be several other usage. at this moment, we use this for ipsec socket pointer passing. this will avoid reuse of m->m_pkthdr.rcvif in ipsec code.
due to the change, MHLEN will be decreased by sizeof(void *) - for example, for i386, MHLEN was 100 bytes, but is now 96 bytes. we may want to increase MSIZE from 128 to 256 for some of our architectures.
take caution if you use it for keeping some data item for long period of time - use extra caution on M_PREPEND() or m_adj(), as they may result in loss of m->m_pkthdr.aux pointer (and mbuf leak).
this will bump kernel version.
(as discussed in tech-net, tested in kame tree)
|
1.11 |
| 26-Feb-2000 |
itojun | bring in recent KAME changes (only important and stable ones, as usual). - remove net.inet6.ip6.nd6_proxyall. introduce proxy NDP code works just like "arp -s". - revise source address selection. be more careful about use of yet-to-be-valid addresses as source. - as router, transmit ICMP6_DST_UNREACH_BEYONDSCOPE against out-of-scope packet forwarding attempt. - path MTU discovery takes care of routing header properly. - be more strict about mbuf chain parsing.
|
1.10 |
| 06-Feb-2000 |
itojun | fix include pathname for better rfc2292 compliance.
|
1.9 |
| 06-Jan-2000 |
itojun | remove extra portability #ifdef (like #ifdef __FreeBSD__) in KAME IPv6/IPsec code, from netbsd-current repository. #ifdef'ed version is always available from ftp.kame.net.
XXX please do not make too many diff-unfriendly changes, we'll need to take bunch of diffs on upgrade...
|
1.8 |
| 15-Dec-1999 |
itojun | do not overwrite traffic class field when we write IPv6 version field.
|
1.7 |
| 13-Dec-1999 |
itojun | sync IPv6 part with latest KAME tree. IPsec part is left unmodified due to massive changes in KAME side. - IPv6 output goes through nd6_output - faith can capture IPv4 packets as well - you can run IPv4-to-IPv6 translator using heavily modified DNS servers - per-interface statistics (required for IPv6 MIB) - interface autoconfig is revisited - udp input handling has a big change for mapped address support. - introduce in4_cksum() for non-overwriting checksumming - introduce m_pulldown() - neighbor discovery cleanups/improvements - netinet/in.h strictly conforms to RFC2553 (no extra defs visible to userland) - IFA_STATS is fixed a bit (not tested) - and more more more.
TODO: - cleanup os-independency #ifdef - avoid rcvif dual use (for IPsec) to help ifdetach
(sorry for jumbo commit, I can't separate this any more...)
|
1.6 |
| 31-Jul-1999 |
itojun | branches: 1.6.2; 1.6.8; sync with recent KAME. - loosen ipsec restriction on packet diredtion. - revise icmp6 redirect handling on IsRouter bit. - tcp/udp notification processing (link-local address case) - cosmetic fixes (better code share across *BSD).
|
1.5 |
| 09-Jul-1999 |
thorpej | defopt IPSEC and IPSEC_ESP (both into opt_ipsec.h).
|
1.4 |
| 04-Jul-1999 |
itojun | s/splnet/splsoftnet/ in IPv6/IPsec part. hope I made no mistake (the kernel works fine but I need a regress test)
Suggested by: thorpej
|
1.3 |
| 03-Jul-1999 |
thorpej | RCS ID police.
|
1.2 |
| 01-Jul-1999 |
itojun | branches: 1.2.2; IPv6 kernel code, based on KAME/NetBSD 1.4, SNAP kit 19990628. (Sorry for a big commit, I can't separate this into several pieces...) Pls check sys/netinet6/TODO and sys/netinet6/IMPLEMENTATION for details.
- sys/kern: do not assume single mbuf, accept chained mbuf on passing data from userland to kernel (or other way round). - "midway" ATM card: ATM PVC pseudo device support, like those done in ALTQ package (ftp://ftp.csl.sony.co.jp/pub/kjc/). - sys/netinet/tcp*: IPv4/v6 dual stack tcp support. - sys/netinet/{ip6,icmp6}.h, sys/net/pfkeyv2.h: IETF document assumes those file to be there so we patch it up. - sys/netinet: IPsec additions are here and there. - sys/netinet6/*: most of IPv6 code sits here. - sys/netkey: IPsec key management code - dev/pci/pcidevs: regen
In my understanding no code here is subject to export control so it should be safe.
|
1.1 |
| 28-Jun-1999 |
itojun | branches: 1.1.2; file mld6.c was initially added on branch kame.
|
1.1.2.3 |
| 30-Nov-1999 |
itojun | bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch just for reference purposes. This commit includes 1.4 -> 1.4.1 sync for kame branch.
The branch does not compile at all (due to the lack of ALTQ and some other source code). Please do not try to modify the branch, this is just for referenre purposes.
synchronization to latest KAME will take place on HEAD branch soon.
|
1.1.2.2 |
| 06-Jul-1999 |
itojun | KAME/NetBSD 1.4, SNAP kit 1999/07/05. NOTE: this branch is just for reference purposes (i.e. for taking cvs diff). do not touch anything on the branch. actual work must be done on HEAD branch.
|
1.1.2.1 |
| 28-Jun-1999 |
itojun | KAME/NetBSD 1.4 SNAP kit, dated 19990628.
NOTE: this branch (kame) is used just for refernce. this may not compile due to multiple reasons.
|
1.2.2.3 |
| 02-Aug-1999 |
thorpej | Update from trunk.
|
1.2.2.2 |
| 01-Jul-1999 |
thorpej | Sync w/ -current.
|
1.2.2.1 |
| 01-Jul-1999 |
thorpej | file mld6.c was added on branch chs-ubc2 on 1999-07-01 23:48:29 +0000
|
1.6.8.1 |
| 27-Dec-1999 |
wrstuden | Pull up to last week's -current.
|
1.6.2.2 |
| 11-Feb-2001 |
bouyer | Sync with HEAD.
|
1.6.2.1 |
| 20-Nov-2000 |
bouyer | Update thorpej_scsipi to -current as of a month ago
|
1.13.4.2 |
| 23-Jun-2002 |
jdolecek | catch up with -current on kqueue branch
|
1.13.4.1 |
| 10-Jan-2002 |
thorpej | Sync kqueue branch with -current.
|
1.13.2.6 |
| 20-Jun-2002 |
nathanw | Catch up to -current.
|
1.13.2.5 |
| 28-Feb-2002 |
nathanw | Catch up to -current.
|
1.13.2.4 |
| 11-Jan-2002 |
nathanw | More catchup.
|
1.13.2.3 |
| 08-Jan-2002 |
nathanw | Catch up to -current.
|
1.13.2.2 |
| 14-Nov-2001 |
nathanw | Catch up to -current.
|
1.13.2.1 |
| 22-Oct-2001 |
nathanw | Catch up to -current.
|
1.18.10.1 |
| 02-Oct-2003 |
tron | Pull up revision 1.22 via patch (requested by itojun in ticket #1491): - sync up MLD declaration with RFC3542 (s/MLD6/MLD/) part of advanced API update (RFC2292 -> 3542).
|
1.18.8.1 |
| 20-Jun-2002 |
gehenna | catch up with -current.
|
1.22.2.4 |
| 04-Mar-2005 |
skrll | Sync with HEAD.
Hi Perry!
|
1.22.2.3 |
| 21-Sep-2004 |
skrll | Fix the sync with head I botched.
|
1.22.2.2 |
| 18-Sep-2004 |
skrll | Sync with HEAD.
|
1.22.2.1 |
| 03-Aug-2004 |
skrll | Sync with HEAD
|
1.26.10.1 |
| 19-Mar-2005 |
yamt | sync with head. xen and whitespace. xen part is not finished.
|
1.26.8.1 |
| 29-Apr-2005 |
kent | sync with -current
|
1.27.4.5 |
| 17-Mar-2008 |
yamt | sync with head.
|
1.27.4.4 |
| 27-Oct-2007 |
yamt | sync with head.
|
1.27.4.3 |
| 03-Sep-2007 |
yamt | sync with head.
|
1.27.4.2 |
| 30-Dec-2006 |
yamt | sync with head.
|
1.27.4.1 |
| 21-Jun-2006 |
yamt | sync with head.
|
1.28.2.1 |
| 01-Feb-2006 |
yamt | sync with head.
|
1.29.4.1 |
| 22-Apr-2006 |
simonb | Sync with head.
|
1.29.2.1 |
| 09-Sep-2006 |
rpaulo | sync with head
|
1.30.2.1 |
| 13-Mar-2006 |
yamt | sync with head.
|
1.32.14.2 |
| 10-Dec-2006 |
yamt | sync with head.
|
1.32.14.1 |
| 22-Oct-2006 |
yamt | sync with head
|
1.32.12.2 |
| 12-Jan-2007 |
ad | Sync with head.
|
1.32.12.1 |
| 18-Nov-2006 |
ad | Sync with head.
|
1.36.12.1 |
| 23-Aug-2008 |
bouyer | Pull up following revision(s) (requested by adrianp in ticket #1187): sys/netinet6/mld6.c: revision 1.47 Fix from matt@ for malformed ICMPv6 MLD query (CVE-2008-2464).
|
1.36.8.1 |
| 04-Sep-2008 |
skrll | Sync with netbsd-4.
|
1.36.4.1 |
| 12-Mar-2007 |
rmind | Sync with HEAD.
|
1.36.2.1 |
| 23-Aug-2008 |
bouyer | Pull up following revision(s) (requested by adrianp in ticket #1187): sys/netinet6/mld6.c: revision 1.47 Fix from matt@ for malformed ICMPv6 MLD query (CVE-2008-2464).
|
1.37.4.1 |
| 11-Jul-2007 |
mjf | Sync with head.
|
1.37.2.4 |
| 23-Oct-2007 |
ad | Sync with head.
|
1.37.2.3 |
| 09-Oct-2007 |
ad | Sync with head.
|
1.37.2.2 |
| 01-Jul-2007 |
ad | Adapt to callout API change.
|
1.37.2.1 |
| 08-Jun-2007 |
ad | Sync with head.
|
1.39.8.2 |
| 23-Mar-2008 |
matt | sync with HEAD
|
1.39.8.1 |
| 06-Nov-2007 |
matt | sync with HEAD
|
1.39.6.2 |
| 26-Oct-2007 |
joerg | Sync with HEAD.
Follow the merge of pmap.c on i386 and amd64 and move pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup code to restore CR4 before jumping back into kernel space as the large page option might cover that.
|
1.39.6.1 |
| 03-Sep-2007 |
jmcneill | Sync with HEAD.
|
1.39.2.1 |
| 03-Sep-2007 |
skrll | Sync with HEAD.
|
1.40.2.1 |
| 18-Oct-2007 |
yamt | sync with head.
|
1.41.18.4 |
| 17-Jan-2009 |
mjf | Sync with HEAD.
|
1.41.18.3 |
| 28-Sep-2008 |
mjf | Sync with HEAD.
|
1.41.18.2 |
| 02-Jun-2008 |
mjf | Sync with HEAD.
|
1.41.18.1 |
| 03-Apr-2008 |
mjf | Sync with HEAD.
|
1.41.14.1 |
| 24-Mar-2008 |
keiichi | sync with head.
|
1.44.2.2 |
| 04-Jun-2008 |
yamt | sync with head
|
1.44.2.1 |
| 18-May-2008 |
yamt | sync with head.
|
1.45.4.2 |
| 18-Sep-2008 |
wrstuden | Sync with wrstuden-revivesa-base-2.
|
1.45.4.1 |
| 23-Jun-2008 |
wrstuden | Sync w/ -current. 34 merge conflicts to follow.
|
1.45.2.2 |
| 19-Aug-2009 |
yamt | sync with head.
|
1.45.2.1 |
| 04-May-2009 |
yamt | sync with head.
|
1.46.4.2 |
| 13-Dec-2008 |
haad | Update haad-dm branch to haad-dm-base2.
|
1.46.4.1 |
| 19-Oct-2008 |
haad | Sync with HEAD.
|
1.47.2.2 |
| 28-Apr-2009 |
skrll | Sync with HEAD.
|
1.47.2.1 |
| 19-Jan-2009 |
skrll | Sync with HEAD.
|
1.48.4.1 |
| 13-May-2009 |
jym | Sync with HEAD.
Commit is split, to avoid a "too many arguments" protocol error.
|
1.51.6.1 |
| 06-Jun-2011 |
jruoho | Sync with HEAD.
|
1.51.4.1 |
| 31-May-2011 |
rmind | sync with head
|
1.54.2.1 |
| 17-Apr-2012 |
yamt | sync with head
|
1.55.22.1 |
| 10-Aug-2014 |
tls | Rebase.
|
1.55.8.2 |
| 03-Dec-2017 |
jdolecek | update from HEAD
|
1.55.8.1 |
| 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.55.4.1 |
| 29-Dec-2014 |
martin | Pull up following revision(s) (requested by ozaki-r in ticket #1224): sys/netinet6/mld6.c: revision 1.61 Ensure callout isn't running and pending before callout_destroy Call callout_halt before callout_destroy. And also let callout (mld_timeo) not call callout_schedule when we already called callout_halt. This fixes PR 47881.
|
1.59.2.3 |
| 18-Nov-2015 |
msaitoh | Pull up following revision(s) (requested by joerg in ticket #1035): sys/netinet6/mld6.c: revision 1.64 Ensure that the callout of the multicast address is valid before hooking it up.
|
1.59.2.2 |
| 23-Jan-2015 |
martin | branches: 1.59.2.2.2; Pull up following revision(s) (requested by pettai in ticket #441): sys/netinet6/ip6_var.h: revision 1.64 sys/netinet6/in6.h: revision 1.82 sys/netinet6/in6_src.c: revision 1.56 sys/netinet6/mld6.c: revision 1.62 sys/netinet6/ip6_input.c: revision 1.150 sys/netinet6/ip6_output.c: revision 1.161 Add net.inet6.ip6.prefer_tempaddr sysctl knob so that we can prefer IPv6 temporary addresses as the source address. Fixes PR kern/47100 based on a patch by Dieter Roelants.
|
1.59.2.1 |
| 29-Dec-2014 |
martin | Pull up following revision(s) (requested by ozaki-r in ticket #360): sys/netinet6/mld6.c: revision 1.61 Ensure callout isn't running and pending before callout_destroy Call callout_halt before callout_destroy. And also let callout (mld_timeo) not call callout_schedule when we already called callout_halt. This fixes PR 47881.
|
1.59.2.2.2.1 |
| 18-Nov-2015 |
msaitoh | Pull up following revision(s) (requested by joerg in ticket #1035): sys/netinet6/mld6.c: revision 1.64 Ensure that the callout of the multicast address is valid before hooking it up.
|
1.61.2.8 |
| 28-Aug-2017 |
skrll | Sync with HEAD
|
1.61.2.7 |
| 05-Feb-2017 |
skrll | Sync with HEAD
|
1.61.2.6 |
| 05-Dec-2016 |
skrll | Sync with HEAD
|
1.61.2.5 |
| 05-Oct-2016 |
skrll | Sync with HEAD
|
1.61.2.4 |
| 09-Jul-2016 |
skrll | Sync with HEAD
|
1.61.2.3 |
| 27-Dec-2015 |
skrll | Sync with HEAD (as of 26th Dec)
|
1.61.2.2 |
| 22-Sep-2015 |
skrll | Sync with HEAD
|
1.61.2.1 |
| 06-Apr-2015 |
skrll | Sync with HEAD
|
1.72.2.4 |
| 20-Mar-2017 |
pgoyette | Sync with HEAD
|
1.72.2.3 |
| 07-Jan-2017 |
pgoyette | Sync with HEAD. (Note that most of these changes are simply $NetBSD$ tag issues.)
|
1.72.2.2 |
| 06-Aug-2016 |
pgoyette | Sync with HEAD
|
1.72.2.1 |
| 26-Jul-2016 |
pgoyette | Sync with HEAD
|
1.77.2.1 |
| 21-Apr-2017 |
bouyer | Sync with HEAD
|
1.88.4.1 |
| 19-May-2017 |
pgoyette | Resolve conflicts from previous merge (all resulting from $NetBSD keywork expansion)
|
1.89.2.2 |
| 07-Jun-2018 |
martin | Pull up following revision(s) (requested by ozaki-r in ticket #842):
sys/netinet6/mld6.c: revision 1.93-1.99 sys/netinet6/in6_var.h: revision 1.99,1.100 sys/netinet6/in6.c: revision 1.267,1.268 sys/netinet6/nd6.c: revision 1.249
Don't hold softnet_lock in mld_timeo Then we can get rid of remaining abuses of mutex_owned(softnet_lock).
Release in6_multilock on callout_halt of mld_timeo to avoid a deadlock Improve atomicity of in6_leavegroup and in6_delmulti
Avoid NULL pointer dereference on imm->i6mm_maddr
Make a refcount decrement and a removal from a list of an item atomic in6m_refcount of an in6m can be incremented if the in6m is on the list (if_multiaddrs) in in6_addmulti or mld_input. So we must avoid such an increment when we try to destroy an in6m. To this end we must make an in6m_refcount decrement and a removal of an in6m from if_multiaddrs atomic.
Make a deletion of in6m in nd6_rtrequest atomic
Move LIST_REMOVE mld_stoptimer releases in6_multilock temporarily, so we must LIST_REMOVE first.
Avoid double LIST_REMOVE which corrupts lists Mark in6m as used for non-DIAGNOSTIC builds.
|
1.89.2.1 |
| 02-Jan-2018 |
snj | Pull up following revision(s) (requested by ozaki-r in ticket #456): sys/arch/arm/sunxi/sunxi_emac.c: 1.9 sys/dev/ic/dwc_gmac.c: 1.43-1.44 sys/dev/pci/if_iwm.c: 1.75 sys/dev/pci/if_wm.c: 1.543 sys/dev/pci/ixgbe/ixgbe.c: 1.112 sys/dev/pci/ixgbe/ixv.c: 1.74 sys/kern/sys_socket.c: 1.75 sys/net/agr/if_agr.c: 1.43 sys/net/bpf.c: 1.219 sys/net/if.c: 1.397, 1.399, 1.401-1.403, 1.406-1.410, 1.412-1.416 sys/net/if.h: 1.242-1.247, 1.250, 1.252-1.257 sys/net/if_bridge.c: 1.140 via patch, 1.142-1.146 sys/net/if_etherip.c: 1.40 sys/net/if_ethersubr.c: 1.243, 1.246 sys/net/if_faith.c: 1.57 sys/net/if_gif.c: 1.132 sys/net/if_l2tp.c: 1.15, 1.17 sys/net/if_loop.c: 1.98-1.101 sys/net/if_media.c: 1.35 sys/net/if_pppoe.c: 1.131-1.132 sys/net/if_spppsubr.c: 1.176-1.177 sys/net/if_tun.c: 1.142 sys/net/if_vlan.c: 1.107, 1.109, 1.114-1.121 sys/net/npf/npf_ifaddr.c: 1.3 sys/net/npf/npf_os.c: 1.8-1.9 sys/net/rtsock.c: 1.230 sys/netcan/if_canloop.c: 1.3-1.5 sys/netinet/if_arp.c: 1.255 sys/netinet/igmp.c: 1.65 sys/netinet/in.c: 1.210-1.211 sys/netinet/in_pcb.c: 1.180 sys/netinet/ip_carp.c: 1.92, 1.94 sys/netinet/ip_flow.c: 1.81 sys/netinet/ip_input.c: 1.362 sys/netinet/ip_mroute.c: 1.147 sys/netinet/ip_output.c: 1.283, 1.285, 1.287 sys/netinet6/frag6.c: 1.61 sys/netinet6/in6.c: 1.251, 1.255 sys/netinet6/in6_pcb.c: 1.162 sys/netinet6/ip6_flow.c: 1.35 sys/netinet6/ip6_input.c: 1.183 sys/netinet6/ip6_output.c: 1.196 sys/netinet6/mld6.c: 1.90 sys/netinet6/nd6.c: 1.239-1.240 sys/netinet6/nd6_nbr.c: 1.139 sys/netinet6/nd6_rtr.c: 1.136 sys/netipsec/ipsec_output.c: 1.65 sys/rump/net/lib/libnetinet/netinet_component.c: 1.9-1.10 kmem_intr_free kmem_intr_[z]alloced memory the underlying pools are the same but api-wise those should match Unify IFEF_*_MPSAFE into IFEF_MPSAFE There are already two flags for if_output and if_start, however, it seems such MPSAFE flags are eventually needed for all if_XXX operations. Having discrete flags for each operation is wasteful of if_extflags bits. So let's unify the flags into one: IFEF_MPSAFE. Fortunately IFEF_*_MPSAFE flags have never been included in any releases, so we can change them without breaking backward compatibility of the releases (though the kernel version of -current should be bumped). Note that if an interface have both MP-safe and non-MP-safe operations at a time, we have to set the IFEF_MPSAFE flag and let callees of non-MP-safe opeartions take the kernel lock. Proposed on tech-kern@ and tech-net@ Provide macros for softnet_lock and KERNEL_LOCK hiding NET_MPSAFE switch It reduces C&P codes such as "#ifndef NET_MPSAFE KERNEL_LOCK(1, NULL); ..." scattered all over the source code and makes it easy to identify remaining KERNEL_LOCK and/or softnet_lock that are held even if NET_MPSAFE. No functional change Hold KERNEL_LOCK on if_ioctl selectively based on IFEF_MPSAFE If IFEF_MPSAFE is set, hold the lock and otherwise don't hold. This change requires additions of KERNEL_LOCK to subsequence functions from if_ioctl such as ifmedia_ioctl and ifioctl_common to protect non-MP-safe components. Proposed on tech-kern@ and tech-net@ Ensure to hold if_ioctl_lock when calling if_flags_set Fix locking against myself on ifpromisc vlan_unconfig_locked could be called with holding if_ioctl_lock. Ensure to not turn on IFF_RUNNING of an interface until its initialization completes And ensure to turn off it before destruction as per IFF_RUNNING's description "resource allocated". (The description is a bit doubtful though, I believe the change is still proper.) Ensure to hold if_ioctl_lock on if_up and if_down One exception for if_down is if_detach; in the case the lock isn't needed because it's guaranteed that no other one can access ifp at that point. Make if_link_queue MP-safe if IFEF_MPSAFE if_link_queue is a queue to store events of link state changes, which is used to pass events from (typically) an interrupt handler to if_link_state_change softint. The queue was protected by KERNEL_LOCK so far, but if IFEF_MPSAFE is enabled, it becomes unsafe because (perhaps) an interrupt handler of an interface with IFEF_MPSAFE doesn't take KERNEL_LOCK. Protect it by a spin mutex. Additionally with this change KERNEL_LOCK of if_link_state_change softint is omitted if NET_MPSAFE is enabled. Note that the spin mutex is now ifp->if_snd.ifq_lock as well as the case of if_timer (see the comment). Use IFADDR_WRITER_FOREACH instead of IFADDR_READER_FOREACH At that point no other one modifies the list so IFADDR_READER_FOREACH is unnecessary. Use of IFADDR_READER_FOREACH is harmless in general though, if we try to detect contract violations of pserialize, using it violates the contract. So avoid using it makes life easy. Ensure to call if_addr_init with holding if_ioctl_lock Get rid of outdated comments Fix build of kernels without ether By throwing out if_enable_vlan_mtu and if_disable_vlan_mtu that created a unnecessary dependency from if.c to if_ethersubr.c. PR kern/52790 Rename IFNET_LOCK to IFNET_GLOBAL_LOCK IFNET_LOCK will be used in another lock, if_ioctl_lock (might be renamed then). Wrap if_ioctl_lock with IFNET_* macros (NFC) Also if_ioctl_lock perhaps needs to be renamed to something because it's now not just for ioctl... Reorder some destruction routines in if_detach - Destroy if_ioctl_lock at the end of the if_detach because it's used in various destruction routines - Move psref_target_destroy after pr_purgeif because we want to use psref in pr_purgeif (otherwise destruction procedures can be tricky) Ensure to call if_mcast_op with holding IFNET_LOCK Note that CARP doesn't deal with IFNET_LOCK yet. Remove IFNET_GLOBAL_LOCK where it's unnecessary because IFNET_LOCK is held Describe which lock is used to protect each member variable of struct ifnet Requested by skrll@ Write a guideline for converting an interface to IFEF_MPSAFE Requested by skrll@ Note that IFNET_LOCK must not be held in softint Don't set IFEF_MPSAFE unless NET_MPSAFE at this point Because recent investigations show that interfaces with IFEF_MPSAFE need to follow additional restrictions to work with the flag safely. We should enable it on an interface by default only if the interface surely satisfies the restrictions, which are described in if.h. Note that enabling IFEF_MPSAFE solely gains a few benefit on performance because the network stack is still serialized by the big kernel locks by default.
|
1.91.2.3 |
| 26-Dec-2018 |
pgoyette | Sync with HEAD, resolve a few conflicts
|
1.91.2.2 |
| 25-Jun-2018 |
pgoyette | Sync with HEAD
|
1.91.2.1 |
| 02-May-2018 |
pgoyette | Synch with HEAD
|
1.99.2.2 |
| 13-Apr-2020 |
martin | Mostly merge changes from HEAD upto 20200411
|
1.99.2.1 |
| 10-Jun-2019 |
christos | Sync with HEAD
|