Age | Commit message (Collapse) | Author |
|
<netinet/tcp_debug.h>.
The IPv6 variant was always included and the IPv4 version is not
present on all systems.
Most of the offending ports are already fixed, thanks to sthen@!
|
|
packets. This is the IP in IP protocol input function, so call it
ipip_input(). Rename the existing ipip_input() to ipip_input_gif()
as it is the input function used by the gif interface. Pass the
address family to make it consistent with pr_input. Use __func__
in debug print and panic messages. Move all ipip prototypes to the
ip_ipip.h header file.
OK dhill@ mpi@
|
|
out what is going on. There were also some inconsistencies that
seem to be oversights. Use more specific the #ifdefs.
OK mpi@
|
|
* use a variable to allow disabling debugs on run-time
* fix a potential memory leak on copyout() failure
* don't just blindly use the first address provided by ifalist
ok bluhm@
|
|
ok bluhm@
|
|
ok visa@
|
|
setsockopt(), otherwise use non-blocking malloc() for network stack
calls.
ok bluhm@
|
|
when finding one. Since rtfree() is being called and rt_llinfo being
removed, add checks everywhere to make sure we are using a route that is
not being removed.
ok bluhm@
|
|
this is done in in6_pcbconnect().
OK mpi@
|
|
they have been decrypted. That means that all the IP header fields
were checked twice. Also fragment reassembly was tried twice.
At pf incoming packets in tunnel mode appeared twice on the enc0
interface, once as IP-in-IP and once as the inner packet. In the
outgoing path pf only sees the inner packet. Asymmetry is bad for
stateful filtering.
IPv6 shows that IPsec works without that. After decrypting immediately
continue with local delivery. In tunnel mode the IP-in-IP protocol
functions pass the inner header to ip6_input(). In transport mode
only pf_test() has to be called for the enc0 device.
Introduce ip_local() to avoid needless processing and cleaner pf
behavior in IPv4 IPsec.
OK mikeb@
|
|
code in tcp_usrreq(PRU_CONNECT). Do not access sockaddr_in before
checking the address family. Return EAFNOSUPPORT error in the
default case.
OK mikeb@
|
|
early if the IPsec security protocol is unknown. ipsec_common_input()
and ipsec_common_input_cb() can only be called with the IP protocols
ESP, AH, or IPComp. Everything else is a programming mistake.
OK claudio@
|
|
in ip6_input(). While there avoid an ugly #ifdef in ipv4_input().
OK mikeb@
|
|
decrypted packets in the input path were not checked with pf. So
with stateful filtering on enc0, direction aware protocols like
ping or TCP did not pass. Add an explicit pf_test() in
ipsec_common_input_cb() for IPv6 transport mode to fix this.
OK mikeb@
|
|
|
|
rip_output() function is never called via the pr_output pointer.
rip_usrreq(PRU_SEND) calls rip_output() directly. raw_usrreq() is
never called from inetsw. Situation in inet and inet6 is analog.
OK claudio@ mikeb@
|
|
No binary change.
OK mpi@
|
|
in ip6_input(). Do not check that again in the protocol input
functions.
OK mpi@
|
|
the function declaration of ipe4_input() and avoid a wrong cast.
OK mikeb@ dhill@
|
|
kernel. It was only used in IPsec sources. No binary change
OK deraadt@
|
|
change the pointer. Then *mp keeps the invalid pointer and it might
be used. Fix the potential use after free and also reset *mp in
other places to have less dangling pointers to freed mbufs.
OK mpi@ mikeb@
|
|
inline function instead of casting it to sockaddr. While there,
use inline instead of __inline for all these conversions. Some
struct sockaddr casts can be avoided completely.
OK dhill@ mpi@
|
|
adjust the comment to match reality (or at least rfc7323) instead.
This brings us back in line with the behavior of Net and Free.
From Lauri Tirkkonen. OK bluhm@
|
|
ok djm
|
|
No binary change.
OK mpi@
|
|
address family passed down with pr_input to check that the correct
one is used.
OK florian@
|
|
tcp_input().
OK florian@
|
|
udp_input().
OK florian@
|
|
allows to simplify code used for both IPv4 and IPv6.
OK mikeb@ deraadt@
|
|
constants.
The consensus is that if both operands are constant, we don't need
mallocarray. Reminded by tedu@
ok deraadt@
|
|
ok deraadt@
|
|
use memmove. While here, change some previous conversions to a simple
assignment.
ok deraadt@
|
|
properly aligned and sockaddr_union fields, or with memcpy when
the memory doesn't overlap.
OK bluhm@
|
|
properly aligned malloc(9)d data and sockaddr_union fields. While here,
convert the remaining bcopy() to memmove().
with and ok @bluhm
|
|
zero the buffers first. All the current objects appear to be safe,
however future changes might introduce structure pads.
Discussed with guenther, ok bluhm
|
|
Return the sum of per-cpu counters instead of the current cpu's
counters. Brainfart on my side. Analysis and fix by Andrei-Marius Radu.
|
|
calculate the prefixlen using the address before sending the RTM_NEWADDR
message.
ok claudio@
|
|
OK mpi@
|
|
unneeded splnet()/splx() dance.
ok mikeb@, bluhm@
|
|
are not going to get a unicast route by accident.
ok mpi@
|
|
causing ip_mforward() not to send packets to the userland multicast
routing daemon.
Reported and tested by Paul de Weerd.
ok bluhm@, claudio@
|
|
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
|
|
ok bluhm@ dhill@ mpi@
|
|
Will make transition to percpu counters easier. ok bluhm@
|
|
need netlock. Remove the obsolete splnet.
OK mpi@
|
|
ones, into the IPv4 hash. They cannot be used before bind(2) anyway
and then they are rehashed and rehooked, so this was not noticed.
Nevertheless put IPv6 PCBs into the IPv6 hash from the beginning.
OK jca@ mpi@
|
|
ok bluhm@
|
|
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@
|
|
fixed parameters.
OK mpi@ claudio@ dhill@
|
|
ok dhill@, florian@, bluhm@
|