| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
more consistent to the other protocols' usrreq functions.
OK visa@ claudio@
|
|
|
|
|
|
| |
a fixed socket send buffer size for TCP. tcp_update_sndspace()
could overwrite the value as the algorithms were not in sync.
OK benno@ claudio@
|
|
|
|
|
|
|
|
| |
was NULL and nothing was traced. So save the old tcpcb and use
that to retrieve some information. Note that otb may be freed and
must not be dereferenced. Use a heuristic for cases where the
address family is in the IP header but not provided in the PCB.
OK visa@
|
|
|
|
|
|
|
| |
For the PRU_CONTROL bit the NET_LOCK surrounds in[6]_control() and
on the ENOTSUPP case we guard the driver if_ioctl functions.
OK mpi@
|
|
|
|
|
| |
remove the #ifdef KPROF which seems to be unused since that year.
OK mpi@
|
|
|
|
|
| |
inp cannot be NULL. Remove the useless if in tcp_usrreq().
OK mpi@
|
|
|
|
|
| |
prints the ATTACH action for TCP debugging socketes correctly.
OK bluhm@
|
|
|
|
|
|
| |
got lost with the pr_detach conversion. While there, remove some
dead code.
OK mpi@
|
|
|
|
|
|
| |
be atomically read from any context.
ok bluhm@, visa@
|
|
|
|
|
|
|
|
| |
security check prevents that the user accidentally configures
redirect where a divert-to would be appropriate. Instead of spreading
the logic into tcp and udp input, check the flag during PCB listen
lookup. This also reduces parameters of in_pcblookup_listen().
OK visa@
|
|
|
|
| |
OK florian@
|
|
|
|
|
|
| |
pr_input handlers without KERNEL_LOCK().
ok visa@
|
|
|
|
|
|
| |
functions to pave way for more fine grained locking.
Suggested by, comments & OK mpi
|
|
|
|
|
|
|
|
|
| |
TCP_FACK was disabled by provos@ in June 1999.
TCP_FACK is an algorithm that decides that when something is lost, all
not SACKed packets until the most forward SACK are lost. It may be a
correct estimate, if network does not reorder packets.
OK visa@ mpi@ mikeb@
|
|
|
|
| |
OK deraadt, mpi, visa, job
|
|
|
|
|
|
| |
Exposes per-CPU counters to real parrallelism.
ok visa@, bluhm@, jca@
|
|
|
|
|
|
| |
Not all of them need the NET_LOCK().
ok bluhm@
|
|
|
|
|
|
| |
all the callers to call m_freem(9).
Support from deraadt@ and tedu@, ok visa@, bluhm@
|
|
|
|
|
|
| |
Especially in tcp_usrreq() connect detect the correct address family
based on the inp_flags instead of the sa_family user input.
OK mpi@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
buffers.
This is one step towards unlocking TCP input path. Note that all the
functions asserting for the socket lock are not necessarilly MP-safe.
All the fields of 'struct socket' aren't protected.
Introduce a new kernel-only kqueue hint, NOTE_SUBMIT, to be able to
tell when a filter needs to lock the underlying data structures. Logic
and name taken from NetBSD.
Tested by Hrvoje Popovski.
ok claudio@, bluhm@, mikeb@
|
|
|
|
|
|
|
|
|
| |
<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@!
|
|
|
|
| |
ok visa@
|
|
|
|
|
| |
this is done in in6_pcbconnect().
OK mpi@
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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 mpi@ bluhm@
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
| |
ok bluhm@, kettenis@
|
|
|
|
| |
ok visa@, mikeb@
|
| |
|
|
|
|
|
|
|
|
|
|
| |
softnet assert failures. It is better to place the lock into
net_sysctl() where all the protocol sysctls are called via pr_sysctl.
As calling sysctl(2) is in the slow path, doing fine grained locking
has no benefit. Many sysctl cases copy out a struct. Having a
lock around that keeps the struct consistent. Put assertions in
the protocol sysctls that need it.
OK mpi@
|
|
|
|
| |
ok mikeb@, bluhm@
|
|
|
|
|
|
|
|
|
|
|
| |
of the network stack that are not yet ready to be executed in parallel or
where new sleeping points are not possible.
This first pass replace all the entry points leading to ip_output(). This
is done to not introduce new sleeping points when trying to acquire ART's
write lock, needed when a new L2 entry is created via the RT_RESOLVE.
Inputs from and ok bluhm@, ok dlg@
|
|
|
|
|
|
|
| |
This will allow us to keep locking simple as soon as we trade
splsoftnet() for a rwlock.
ok bluhm@, claudio@
|
| |
|
|
|
|
|
| |
relevant counters with netstat -s -p tcp.
OK henning@
|
|
|
|
|
|
|
|
| |
swapping between two syn caches for random reseeding anyway, this
feature can be added easily. When the cache is empty, there is an
opportunity to change the hash size. This allows an admin under
SYN flood attack to defend his machine.
Suggested by claudio@; OK jung@ claudio@ jmc@
|
|
|
|
| |
From Simon Mages, ok beck@, claudio@, bluhm@
|
|
|
|
|
|
| |
cannot be bound to by non-root users.
Ok millert@ bluhm@
|
|
|
|
|
|
|
|
| |
This is convenient to test the feature and may be useful to defend
against syn flooding in a denial of service condition. It is
consistent to the existing syn cache sysctls. Move some declarations
to tcp_var.h to access the syn cache sets from tcp_sysctl().
OK mpi@
|
|
|
|
|
|
| |
in6_pcbbind() into in_pcbbind().
Ok jca@ mpi@
|
|
|
|
|
|
|
|
|
| |
In all but two calls NULL is passed and in the other 2 cases the ifp
is only used to maybe feed it to in6_selecthlim() to select the hoplimit
for the link. Since in6_embedscope() only works on link-local addresses
it does not matter what hop limit we select since the destination is
directly reachable.
OK florian@ mpi@
|
|
|
|
|
|
|
|
| |
sbspace() in the socket buffer shrinks. So a writable socket
reported by poll(2) could become unwritable before calling write(2).
Ensure that a writable or readable socket can still be written to
or read from after changing the buffer size.
Discussed with and OK millert@ deraadt@ claudio@
|
|
|
|
| |
ok stsp mpi
|
|
|
|
|
|
|
|
|
|
|
| |
something based on an address family and later assumes one of the paths
was taken. This was initially just calls to panic until guenther
suggested a function to reduce the amount of strings needed.
This reduces the amount of noise with static analysers and acts
as a sanity check.
ok guenther@ bluhm@
|
|
|
|
|
|
|
| |
annoying trailing, leading and embedded whitespace. No change to
.o files.
ok deraadt@
|
|
|
|
| |
ok mikeb@, krw@, bluhm@, tedu@
|
|
|
|
|
|
| |
of your system, put it on a diet and kill the superfluous logic.
ok mikeb@
|