| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
ok gnezdo@ semarie@ mpi@
|
|
|
|
|
|
|
| |
One case uses the explicit range from the code and the other was
inferred from reading the usage.
OK millert@
|
| |
|
|
|
|
| |
OK deraadt
|
|
|
|
|
|
| |
Thanks kettenis@ for pointing out.
ok kettenis@
|
|
|
|
|
|
|
| |
This introduces bounds checks for many net.inet.tcp sysctl variables.
Folded some fitting cases into the framework: tcp_do_sack, tcp_do_ecn.
ok derradt@
|
|
|
|
|
|
|
| |
Range violations are now consistently reported as EOPNOTSUPP.
Previously they were mixed with ENOPROTOOPT.
OK kn@
|
|
|
|
|
|
|
|
| |
Prevent a panic in syn_cache_insert() found by syzbot.
Reported-by: syzbot+aee24ad9b7bf5665912d@syzkaller.appspotmail.com
ok sashan@, anton@, millert@
|
|
|
|
|
| |
sack hole list length or pool limit.
OK claudio@
|
|
|
|
|
| |
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@
|