#
04ba85d2 |
| 04-Jul-2011 |
mikeb <mikeb@openbsd.org> |
Implement an idle timeout for the socket splicing. A new `sp_idle' field of the `splice' structure can be used to specify a period of inactivity after which splicing will be dissolved. ETIMEDOUT er
Implement an idle timeout for the socket splicing. A new `sp_idle' field of the `splice' structure can be used to specify a period of inactivity after which splicing will be dissolved. ETIMEDOUT error retrieved with a SO_ERROR indicates the idle timeout expiration. With comments from and OK bluhm.
show more ...
|
#
b8d5a5fb |
| 02-Jul-2011 |
nicm <nicm@openbsd.org> |
kqueue attach functions should return an errno or 0, not a plain 1. Fix the obvious cases to return EINVAL and ENXIO.
ok tedu deraadt
|
#
92de07be |
| 02-May-2011 |
mikeb <mikeb@openbsd.org> |
recognize SO_RTABLE socket option at the SOL_SOCKET level; discussed with and ok claudio
|
#
c6ee0b7a |
| 19-Apr-2011 |
bluhm <bluhm@openbsd.org> |
Put splice cleanup code into a common function sounsplice(). ok claudio@
|
#
ab0d2c44 |
| 04-Apr-2011 |
claudio <claudio@openbsd.org> |
Plug mbuf leaks in SO_PEERCRED by not double allocating mbufs into the same variable. Leak found with dlg's magic mbuf leakage finder. OK henning@, deraadt@
|
#
889c0915 |
| 04-Apr-2011 |
claudio <claudio@openbsd.org> |
If the socket was half closed then don't let userland change the socketbuffer size of the closed side since on half close the high watermark was set to 0. OK blambert@
|
#
9f382515 |
| 14-Mar-2011 |
bluhm <bluhm@openbsd.org> |
When a process reads from a spliced socket that already got an end-of-file but still has data in the receive buffer, soreceive() should block until all data has been moved. To make kqueue work with s
When a process reads from a spliced socket that already got an end-of-file but still has data in the receive buffer, soreceive() should block until all data has been moved. To make kqueue work with socket splicing, it has to report spliced sockets as non-readable. ok deraadt@
show more ...
|
#
5ba6082d |
| 12-Mar-2011 |
bluhm <bluhm@openbsd.org> |
There existed a race when a process was trying to read from a spliced socket. soreceive() releases splsoftnet for uiomove(). In that moment, somove() could pull the mbuf from the receive buffer. A
There existed a race when a process was trying to read from a spliced socket. soreceive() releases splsoftnet for uiomove(). In that moment, somove() could pull the mbuf from the receive buffer. After that, soreceive removed the mbuf again. The corrupted length accounting resulted in a panic. The fix is to block read calls in soreceive() until splicing has been finished. just commit deraadt@
show more ...
|
#
407d1d06 |
| 28-Feb-2011 |
bluhm <bluhm@openbsd.org> |
When the maximum splice length has been reached, send out the data immediately by unsetting the SS_ISSENDING flag. This prevents a possible 5 seconds delay in socket splicing. ok markus@; commit it
When the maximum splice length has been reached, send out the data immediately by unsetting the SS_ISSENDING flag. This prevents a possible 5 seconds delay in socket splicing. ok markus@; commit it deraadt@
show more ...
|
#
3e816f04 |
| 07-Jan-2011 |
bluhm <bluhm@openbsd.org> |
Add socket option SO_SPLICE to splice together two TCP sockets. The data received on the source socket will automatically be sent on the drain socket. This allows to write relay daemons with zero da
Add socket option SO_SPLICE to splice together two TCP sockets. The data received on the source socket will automatically be sent on the drain socket. This allows to write relay daemons with zero data copy. ok markus@
show more ...
|
#
5d991f01 |
| 24-Sep-2010 |
claudio <claudio@openbsd.org> |
TCP send and recv buffer scaling. Send buffer is scaled by not accounting unacknowledged on the wire data against the buffer limit. Receive buffer scaling is done similar to FreeBSD -- measure the de
TCP send and recv buffer scaling. Send buffer is scaled by not accounting unacknowledged on the wire data against the buffer limit. Receive buffer scaling is done similar to FreeBSD -- measure the delay * bandwith product and base the buffer on that. The problem is that our RTT measurment is coarse so it overshoots on low delay links. This does not matter that much since the recvbuffer is almost always empty. Add a back pressure mechanism to control the amount of memory assigned to socketbuffers that kicks in when 80% of the cluster pool is used. Increases the download speed from 300kB/s to 4.4MB/s on ftp.eu.openbsd.org.
Based on work by markus@ and djm@.
OK dlg@, henning@, put it in deraadt@
show more ...
|
#
8bb39f08 |
| 03-Jul-2010 |
guenther <guenther@openbsd.org> |
Fix the naming of interfaces and variables for rdomains and rtables and make it possible to bind sockets (including listening sockets!) to rtables and not just rdomains. This changes the name of the
Fix the naming of interfaces and variables for rdomains and rtables and make it possible to bind sockets (including listening sockets!) to rtables and not just rdomains. This changes the name of the system calls, socket option, and ioctl. After building with this you should remove the files /usr/share/man/cat2/[gs]etrdomain.0.
Since this removes the existing [gs]etrdomain() system calls, the libc major is bumped.
Written by claudio@, criticized^Wcritiqued by me
show more ...
|
#
3d5b65aa |
| 02-Jul-2010 |
tedu <tedu@openbsd.org> |
remove support for compat_sunos (and m68k4k). ok deraadt guenther
|
#
aa215408 |
| 01-Jul-2010 |
deraadt <deraadt@openbsd.org> |
SO_PEERCRED should return ENOTCONN when the sockets are not connected
|
#
d6f887bc |
| 30-Jun-2010 |
deraadt <deraadt@openbsd.org> |
Add getsockopt SOL_SOCKET SO_PEERCRED support. This behaves similar to getpeereid(2), but also supplies the remote pid. This is supplied in a 'struct sockpeercred' (unlike Linux -- they showed how l
Add getsockopt SOL_SOCKET SO_PEERCRED support. This behaves similar to getpeereid(2), but also supplies the remote pid. This is supplied in a 'struct sockpeercred' (unlike Linux -- they showed how little they know about real unix by calling theirs 'struct ucred'). ok guenther ajacoutot
show more ...
|
#
45f8a07e |
| 31-Oct-2009 |
fgsch <fgsch@openbsd.org> |
Use suser when possible. Suggested by miod@. miod@ deraadt@ ok.
|
#
9ed051c7 |
| 10-Aug-2009 |
thib <thib@openbsd.org> |
Don't use char arrays for sleep wchans and reuse them. just use strings and make things unique.
ok claudio@
|
#
22760f56 |
| 05-Jun-2009 |
claudio <claudio@openbsd.org> |
Initial support for routing domains. This allows to bind interfaces to alternate routing table and separate them from other interfaces in distinct routing tables. The same network can now be used in
Initial support for routing domains. This allows to bind interfaces to alternate routing table and separate them from other interfaces in distinct routing tables. The same network can now be used in any doamin at the same time without causing conflicts. This diff is mostly mechanical and adds the necessary rdomain checks accross net and netinet. L2 and IPv4 are mostly covered still missing pf and IPv6. input and tested by jsg@, phessler@ and reyk@. "put it in" deraadt@
show more ...
|
#
312f6203 |
| 15-Mar-2009 |
miod <miod@openbsd.org> |
Introduce splsoftassert(), similar to splassert() but for soft interrupt levels. This will allow for platforms where soft interrupt levels do not map to real hardware interrupt levels to have soft ip
Introduce splsoftassert(), similar to splassert() but for soft interrupt levels. This will allow for platforms where soft interrupt levels do not map to real hardware interrupt levels to have soft ipl values overlapping hard ipl values without breaking spl asserts.
show more ...
|
#
01d36b92 |
| 22-Feb-2009 |
otto <otto@openbsd.org> |
fix PR 6082: do not create more fd's than will fit in the message on the receiving side when passing fd's. ok deraadt@ kettenis@
|
#
2a7cd4ce |
| 13-Jan-2009 |
blambert <blambert@openbsd.org> |
Change sbreserve() to return 0 on success, 1 on failure, as god intended. This sort of breaking with traditional and expected behavior annoys me.
"yes!" henning@
|
#
e6364943 |
| 09-Oct-2008 |
deraadt <deraadt@openbsd.org> |
Change sb_timeo to unsigned, so that even if some calculation (ie. n * HZ) becomes a very large number it will not wrap the short into a negative number and screw up timeouts. It will simply become
Change sb_timeo to unsigned, so that even if some calculation (ie. n * HZ) becomes a very large number it will not wrap the short into a negative number and screw up timeouts. It will simply become a max of 65535. Since this happens when HZ is cranked to a high number, this will still only take n seconds, or less. Safer than crashing. Prompted by PR 5511 ok guenther
show more ...
|
#
3f1d3f2c |
| 07-Aug-2008 |
reyk <reyk@openbsd.org> |
don't wait for a free mbuf cluster in sosend() and enter the existing error handler that was never used before. this fixes a bug that a userland process might hang if the system ran out of mbuf clus
don't wait for a free mbuf cluster in sosend() and enter the existing error handler that was never used before. this fixes a bug that a userland process might hang if the system ran out of mbuf clusters or even other unexpected behaviour in the network drivers.
this bug is very old - it is also found in rev 1.1/stevens v2/44lite2/...
discussed with many ok markus@ thib@ dlg@
show more ...
|
#
920b9ef6 |
| 14-Jun-2008 |
mk <mk@openbsd.org> |
A bunch of pool_get() + bzero() -> pool_get(..., .. | PR_ZERO) conversions that should shave a few bytes off the kernel.
ok henning, krw, jsing, oga, miod, and thib (``even though i usually prefer F
A bunch of pool_get() + bzero() -> pool_get(..., .. | PR_ZERO) conversions that should shave a few bytes off the kernel.
ok henning, krw, jsing, oga, miod, and thib (``even though i usually prefer FOO|BAR''; thanks for looking.
show more ...
|
#
621c015e |
| 23-May-2008 |
thib <thib@openbsd.org> |
Deal with the situation when TCP nfs mounts timeout and processes get hung in nfs_reconnect() because they do not have the proper privilages to bind to a socket, by adding a struct proc * argument to
Deal with the situation when TCP nfs mounts timeout and processes get hung in nfs_reconnect() because they do not have the proper privilages to bind to a socket, by adding a struct proc * argument to sobind() (and the *_usrreq() routines, and finally in{6}_pcbbind) and do the sobind() with proc0 in nfs_connect.
OK markus@, blambert@. "go ahead" deraadt@.
Fixes an issue reported by bernd@ (Tested by bernd@). Fixes PR5135 too.
show more ...
|