#
d6a24d14 |
| 27-Aug-2013 |
deraadt <deraadt@openbsd.org> |
Manipulate timevals seperately, not inside a mbuf. Alignment constraints miod ran into. ok miod matthew
|
#
593ef089 |
| 05-Apr-2013 |
tedu <tedu@openbsd.org> |
remove some obsolete casts
|
#
4c8cfc89 |
| 04-Apr-2013 |
bluhm <bluhm@openbsd.org> |
Do not allow the listen(2) syscall for an already connected socket. This would create a weird set of states in TCP. FreeBSD has the same check. Issue found by and OK guenther@
|
#
5c7c3eb6 |
| 27-Mar-2013 |
bluhm <bluhm@openbsd.org> |
Move soidle() into the big #ifdef SOCKET_SPLICE block to have it all in one place. Saves one additional #ifdef, no functional change. OK mikeb@
|
#
4291a85a |
| 19-Mar-2013 |
bluhm <bluhm@openbsd.org> |
After a socket splicing timeout is fired, a network interrupt can unsplice() the sockets before soidle() goes to splsoftnet. In this case, unsplice() was called twice. So check wether splicing stil
After a socket splicing timeout is fired, a network interrupt can unsplice() the sockets before soidle() goes to splsoftnet. In this case, unsplice() was called twice. So check wether splicing still exists within the splsoftnet protection. Uvm fault in sounsplice() reported by keith at scott-land dot net. OK claudio@
show more ...
|
#
25a33a90 |
| 16-Feb-2013 |
bluhm <bluhm@openbsd.org> |
Fix a bug in udp socket splicing in case a packet gets diverted and spliced and routed to loopback. The content of the pf header in the mbuf was keeping the divert information on its way. Reinitial
Fix a bug in udp socket splicing in case a packet gets diverted and spliced and routed to loopback. The content of the pf header in the mbuf was keeping the divert information on its way. Reinitialize the whole packet header of the mbuf and remove the mbuf tags when the packet gets spliced. OK claudio@ markus@
show more ...
|
#
d2895f01 |
| 17-Jan-2013 |
bluhm <bluhm@openbsd.org> |
Expand the socket splicing functionality from TCP to UDP. Merge the code relevant for UDP from sosend() and soreceive() into somove(). That allows the kernel to directly transfer the UDP data from o
Expand the socket splicing functionality from TCP to UDP. Merge the code relevant for UDP from sosend() and soreceive() into somove(). That allows the kernel to directly transfer the UDP data from one socket to another. OK claudio@
show more ...
|
#
a812d04d |
| 15-Jan-2013 |
bluhm <bluhm@openbsd.org> |
Pass an EFBIG error to user land when the maximum splicing length has been reached. This creates a read event on the spliced source socket that can be noticed with select(2). So the kernel passes c
Pass an EFBIG error to user land when the maximum splicing length has been reached. This creates a read event on the spliced source socket that can be noticed with select(2). So the kernel passes control to the relay process immediately. This could be used to log the end of an http request within a persistent connection. deraadt@ reyk@ mikeb@ like the idea
show more ...
|
#
cfc885ac |
| 15-Jan-2013 |
bluhm <bluhm@openbsd.org> |
Changing the socket buffer flags sb_flags was not interrupt safe as |= and &= are non-atomic operations. To avoid additional locks, put the flags that have to be accessed from interrupt into a separ
Changing the socket buffer flags sb_flags was not interrupt safe as |= and &= are non-atomic operations. To avoid additional locks, put the flags that have to be accessed from interrupt into a separate sb_flagsintr 32 bit integer field. sb_flagsintr is protected by splsoftnet. Input from miod@ deraadt@; OK deraadt@
show more ...
|
#
2ff0994f |
| 31-Dec-2012 |
bluhm <bluhm@openbsd.org> |
Put the #ifdef SOCKBUF_DEBUG around sbcheck() into a SBCHECK macro. That is consistent to the SBLASTRECORDCHK and SBLASTMBUFCHK macros. OK markus@
|
#
4abc5217 |
| 05-Oct-2012 |
yasuoka <yasuoka@openbsd.org> |
add send(2) MSG_DONTWAIT support which enables us to choose nonblocking or blocking for each send(2) call.
diff from UMEZAWA Takeshi ok bluhm
|
#
579436d1 |
| 20-Sep-2012 |
bluhm <bluhm@openbsd.org> |
In somove() free the mbufs when necessary instead of freeing them in the release path. Especially accessing m in a KDASSERT() could go wrong. OK claudio@
|
#
bddf6fda |
| 19-Sep-2012 |
bluhm <bluhm@openbsd.org> |
When a socket is spliced, it may not wakeup the userland for reading. There was a small race in sorwakeup() where that could happen if we slept before the SB_SPLICE flag was set. ok claudio@
|
#
88b888f6 |
| 19-Sep-2012 |
bluhm <bluhm@openbsd.org> |
In somove() make the call to pr_usrreq(PRU_RCVD) under the same conditions as in soreceive(). My goal is to make socket splicing less protocol dependent. ok claudio@
|
#
386decdd |
| 17-Sep-2012 |
bluhm <bluhm@openbsd.org> |
Fix indent white spaces.
|
#
a268c841 |
| 22-Jul-2012 |
guenther <guenther@openbsd.org> |
unp_dispose() walks not just the mbuf chain (m_next) but also the packet chain (m_nextpkt), so the mbuf passed to it must be disconnected completely from the socket buffer's chains.
Problem noticed
unp_dispose() walks not just the mbuf chain (m_next) but also the packet chain (m_nextpkt), so the mbuf passed to it must be disconnected completely from the socket buffer's chains.
Problem noticed by yasuoka@; tweak from krw@, ok deraadt@
show more ...
|
#
eeee4136 |
| 10-Jul-2012 |
guenther <guenther@openbsd.org> |
For setsockopt(SO_{SND,RCV}TIMEO), convert the timeval to ticks using tvtohz() so that the rounding is correct and we don't time out a tick early
ok claudio@
|
#
83e2f23d |
| 10-Jul-2012 |
claudio <claudio@openbsd.org> |
Try to cleanup the macro magic because of socket spliceing. Since struct socket is no longer affected by option SOCKET_SPLICE we can simplyfy the code. OK bluhm@
|
#
2627cc47 |
| 07-Jul-2012 |
bluhm <bluhm@openbsd.org> |
Fix two races in socket splicing. When somove() gets called from sosplice() to move the data already there, it might sleep in m_copym(). Another process must not unsplice during that sleep, so also
Fix two races in socket splicing. When somove() gets called from sosplice() to move the data already there, it might sleep in m_copym(). Another process must not unsplice during that sleep, so also lock the receive buffer when sosplice is called with fd -1. The same sleep can allow network interrupts to modify the socket buffer. So use sbsync() to write back modifications within the loop instead of fixing the socket buffer after the loop. OK claudio@
show more ...
|
#
82587d01 |
| 24-Apr-2012 |
deraadt <deraadt@openbsd.org> |
In sosend() for AF_UNIX control message sending, correctly calculate the size (internalized ones can be larger on some architectures) for fitting into the socket. Avoid getting confused by sb_hiwat
In sosend() for AF_UNIX control message sending, correctly calculate the size (internalized ones can be larger on some architectures) for fitting into the socket. Avoid getting confused by sb_hiwat as well. This fixes a variety of issues where sendmsg() would fail to deliver a fd set or fail to wait; even leading to file leakage. Worked on this with claudio for about a week...
show more ...
|
#
06a89b59 |
| 22-Apr-2012 |
guenther <guenther@openbsd.org> |
Add struct proc * argument to FRELE() and FILE_SET_MATURE() in anticipation of further changes to closef(). No binary change.
ok krw@ miod@ deraadt@
|
#
8f15e6a4 |
| 23-Mar-2012 |
guenther <guenther@openbsd.org> |
Make rusage totals, itimers, and profile settings per-process instead of per-rthread. Handling of per-thread tick and runtime counters inspired by how FreeBSD does it.
ok kettenis@
|
#
b0e45555 |
| 17-Mar-2012 |
dlg <dlg@openbsd.org> |
remove IP_JUMBO, SO_JUMBO, and RTF_JUMBO.
no objection from mcbride@ krw@ markus@ deraadt@
|
#
d3794aec |
| 14-Mar-2012 |
kettenis <kettenis@openbsd.org> |
Close a race that would corrupt a sockbuf because the code that externalizes an SCM_RIGHTS message may sleep. Bits and pieces from NetBSD with some simplifications by yours truly.
Fixes the "receiv
Close a race that would corrupt a sockbuf because the code that externalizes an SCM_RIGHTS message may sleep. Bits and pieces from NetBSD with some simplifications by yours truly.
Fixes the "receive 1" panic seen by many.
ok guenther@, claudio@
show more ...
|
#
7c146030 |
| 23-Aug-2011 |
bluhm <bluhm@openbsd.org> |
iPrevent that a socket splicing timeout error in one direction is also added to the other direction. ok mikeb@
|