summaryrefslogtreecommitdiff
path: root/sys/netinet6
AgeCommit message (Collapse)Author
2017-04-14Pass down the address family through the pr_input calls. ThisAlexander Bluhm
allows to simplify code used for both IPv4 and IPv6. OK mikeb@ deraadt@
2017-04-06Convert bcopy to memcpy as the memory does not overlap.David Hill
ok deraadt@
2017-04-05When building counter memory in preparation to copy to userland, alwaysTheo de Raadt
zero the buffers first. All the current objects appear to be safe, however future changes might introduce structure pads. Discussed with guenther, ok bluhm
2017-03-26Do not invalidate a ND cache at the begining of nd6_free().Martin Pieuchot
We should not change the state of a cache entry at this point since the default router selection logic looks at it. Instead, invalidate the cache just before deleting the corresponding route entry, if it applies. Fixes a regression reported by semarie@ ok bluhm@
2017-03-16Userland expects pltime to be a time stamp not number of seconds.Florian Obser
pltime conversion was missing from rev 1.193 which did the vltime conversion only. OK mpi
2017-03-13Move PRU_ATTACH out of the pr_usrreq functions into pr_attach.Claudio Jeker
Attach is quite a different thing to the other PRU functions and this should make locking a bit simpler. This also removes the ugly hack on how proto was passed to the attach function. OK bluhm@ and mpi@ on a previous version
2017-03-08Always invalidate ND entries in nd6_free().Martin Pieuchot
This way RTF_CACHED entries are properly flushed. Fix a regression reported by weerd@ and also tested by matthieu@. ok bluhm@
2017-03-07When the inpcb queue and hash lists are traversed or modified weAlexander Bluhm
need netlock. Remove the obsolete splnet. OK mpi@
2017-03-06Kill global list of IPv6 addresses.Martin Pieuchot
ok bluhm@
2017-03-06Prefix functions dealing with routing messages with 'rtm_' and keepMartin Pieuchot
them all in net/rtsock.c. This allows to easily spot which functions are doing a copyout(9) when dealing with the routing midlayer. ok phessler@, bluhm@, dhill@, krw@, claudio@
2017-03-03Convert the variable argument list of the pr_output functions toAlexander Bluhm
fixed parameters. OK mpi@ claudio@ dhill@
2017-03-03Replace a panic with a compile time assert in icmp6_reflect().Alexander Bluhm
OK mpi@
2017-03-03Iterate over the global list of interfaces instead of using the globalMartin Pieuchot
list of IPv6 addresses. ok bluhm@
2017-03-02Prefer the global list of interfaces to the dying global list of IPv6Martin Pieuchot
addresses in nd6_timer(). ok bluhm@
2017-03-02Use the routing table rather than the global list of IPv6 address.Martin Pieuchot
ok bluhm@
2017-03-02Convert domain declarations to C99 initializers.Martin Pieuchot
ok dhill@, florian@, bluhm@
2017-02-28Some refactoring in ip6_input() needed to un-KERNEL_LOCK() the IPv6Martin Pieuchot
forwarding path. Rename ip6_ours() in ip6_local() as this function dispatches packets to the upper layer. Introduce ip6_ours() and get rid of 'goto hbhcheck'. This function will be later used to enqueue local packets. As a bonus this reduces differences with IPv4. Inputs and ok bluhm@
2017-02-22Use c99 struct initialization with protosw.David Hill
This makes it easier to grep for a member, such as .pr_usrreq, and know which functions to review. ok mpi@ bluhm@ jca@
2017-02-22Fix comments about a few ipv6 sockoptionsRenato Westphal
OK millert@ florian@
2017-02-21In ip6_ctloutput, check for an invalid level early like the otherDavid Hill
*ctloutput functions. This also reduces a level of indentation. ok mpi@
2017-02-16Revert "Release the NET_LOCK() before entering per-driver ioctl() routine".Martin Pieuchot
This is most likely to be the cause of the deadlock seen by port builders since it's the only changed that happened after a2k17. Instead bring back pirofti@ original hack to release the NET_LOCK() inside iwm(4) and iwn(4). This fixes some splassert reported by bluhm@ Deadlock reported by naddy@ and rpe@ and ajacoutot@ confirmed the deadlock has been introduced post a2k17. Tested by and ok tb@
2017-02-09Dedup calls to icmp6stat_inc in icmp6_errcount, should save a few bytesJeremie Courreges-Anglas
ok bluhm@
2017-02-09percpu counters for divert(4) statsJeremie Courreges-Anglas
ok dlg@
2017-02-09percpu counters for raw ipv6 and icmp6 statsJeremie Courreges-Anglas
ok mpi@
2017-02-09percpu counters for TCP statsJeremie Courreges-Anglas
ok mpi@ bluhm@
2017-02-08Remove the ipsec protocol callbacks which all do the same. ImplementAlexander Bluhm
it in ipsec_common_input_cb() instead. The code that was copied to ah6_input_cb() is now in ip6_ours() so we can call it directly. OK mpi@
2017-02-07Release the NET_LOCK() before entering per-driver ioctl() routine.Martin Pieuchot
This prevents a deadlock with the X server and some wireless drivers. The real fix is to take unix domain socket code out of the NET_LOCK(). Issue reported by pirofti@ and ajacoutot@ ok tb@, stsp@, pirofti@
2017-02-06Make ip6_input() more like ipv4_input() and introduce ip6_ours().Alexander Bluhm
OK mpi@
2017-02-05Always allocate counters memory using type M_COUNTERS.Jeremie Courreges-Anglas
This makes the API simpler, and is probably more useful than spreading counters memory other several types, making it harder to track. Prodded by mpi, ok mpi@ stsp@
2017-02-05Use percpu counters for ip6statJeremie Courreges-Anglas
Try to follow the existing examples. Some notes: - don't implement counters_dec() yet, which could be used in two similar chunks of code. Let's see if there are more users first. - stop incrementing IPv6-specific mbuf stats, IPv4 has no equivalent. Input from mpi@, ok bluhm@ mpi@
2017-02-01In sogetopt, preallocate an mbuf to avoid using sleeping mallocs withDavid Hill
the netlock held. This also changes the prototypes of the *ctloutput functions to take an mbuf instead of an mbuf pointer. help, guidance from bluhm@ and mpi@ ok bluhm@
2017-01-29Change the IPv4 pr_input function to the way IPv6 is implemented,Alexander Bluhm
to get rid of struct ip6protosw and some wrapper functions. It is more consistent to have less different structures. The divert_input functions cannot be called anyway, so remove them. OK visa@ mpi@
2017-01-27copypktopts is only called by ip6_setpktopts using M_NOWAIT. DropDavid Hill
canwait as it is unneeded. ok mpi@
2017-01-26Reduce the difference between struct protosw and ip6protosw. TheAlexander Bluhm
IPv4 pr_ctlinput functions did return a void pointer that was always NULL and never used. Make all functions void like in the IPv6 case. OK mpi@
2017-01-23The function raw_input() has not been called since netiso has beenAlexander Bluhm
removed in 2004. The comment about raw_input() above rip_input() was added in 1981, but it is wrong since 1992. After that it has been copied to rip6_input(). (*pr_input)() is never called with the parameters (mbuf, sockproto, sockaddr, sockaddr). So retire raw_input(). OK guenther@ deraadt@
2017-01-19RFC 8021 "IPv6 Atomic Fragments Considered Harmful" deprecatesAlexander Bluhm
generating atomic fragments. So remove the code that sends them. CVE-2016-10142 has been assigned to that issue. OK visa@ mpi@
2017-01-18Use LIST_FOREACH to traverse icmp6_mtudisc_callbacks. Fix whitespaces.Alexander Bluhm
No functional change.
2017-01-10Do not use a 'struct route_in6' when there's no need to cache the resultMartin Pieuchot
of rtalloc(9). ok benno@, lteo@
2017-01-10Remove NULL checks before m_free(9), it deals with it.Martin Pieuchot
ok bluhm@, kettenis@
2017-01-06Kill various splsoftnet().Martin Pieuchot
ok rzalamena@, visa@
2017-01-03Take the neighbor solicitation's source address from the packet toAlexander Bluhm
send if the mbuf contains the complete IPv6 header. The old check was wrong, it required one additional octet after the header. So the source address selection was depending on the layout of the mbuf chain. OK mpi@
2016-12-29Get rid of recursive splsoftnet() in in6_ifattach_linklocal().Martin Pieuchot
ok visa@
2016-12-27Move nd6 timer initialisation to nd6_init() and call timeout_set()Alexander Bluhm
only once during init. OK mpi@
2016-12-26Typo, "more then" -> "more than"Jeremie Courreges-Anglas
2016-12-23Do not call timeout_set(9) multiple times for nd6_slowtimo(), especiallyMartin Pieuchot
whem timeout_set_proc(9) is what we need. Found the hardway by and ok visa@, ok mikeb@, bluhm@
2016-12-22Remove all splsoftnet() from ND6 converting the non-recrusive ones toMartin Pieuchot
NET_LOCK(). ok bluhm@
2016-12-22Remove PIM support from the multicast stack.Rafael Zalamena
ok mpi@
2016-12-21Use __func__ in debug log to reduce noise when grepping.Martin Pieuchot
2016-12-21Remove recursive splsoftnet().Martin Pieuchot
ok bluhm@
2016-12-21Remove recursive splsoftnet() from the ioctl(2) path.Martin Pieuchot
ok bluhm@