summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_usrreq.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* move arc4random prototype to systm.h. more appropriate for most codetedu2014-11-181-3/+1
| | | | to include that than rdnvar.h. ok deraadt dlg
* remove uneeded proc.h includesjsg2014-09-141-2/+1
| | | | ok mpi@ kspillner@
* Fewer <netinet/in_systm.h> !mpi2014-07-221-2/+1
|
* Remove redundant call to in{,6}_pcbbind() from tcp PRU_CONNECT.chrisz2014-04-061-11/+1
| | | | | | | Make sure that in_pcbbind() is called from in_pcbconnect() by KASSERTing that local port == 0 implies an unspecified local address. OK claudio@
* Remove unused proc argument in in6_control().mpi2013-11-221-2/+2
| | | | ok henning@, mikeb@
* Put a large chunk of the IPv6 rdomain support in-tree.phessler2013-10-201-5/+5
| | | | | | Still some important missing pieces, and this is not yet enabled. OK bluhm@
* The header file netinet/in_var.h included netinet6/in6_var.h. Thisbluhm2013-10-171-1/+5
| | | | | | | created a bunch of useless dependencies. Remove this implicit inclusion and do an explicit #include <netinet6/in6_var.h> when it is needed. OK mpi@ henning@
* Add the TCP socket option TCP_NOPUSH to delay sending the stream.bluhm2013-08-121-1/+16
| | | | | | This is useful to aggregate data in the kernel from multiple sources like writes and socket splicing. It avoids sending small packets. From FreeBSD via David Hill; OK mikeb@ henning@
* In tcp_ctloutput() tp was assigned at two different places for IPv4bluhm2013-08-061-6/+1
| | | | | | | and IPv6. The variable tp is not accessed between these two assingments. intotcpcb() is a define without side effects. So use the same code for IPv4 and IPv6. OK claudio@ mpi@
* Move an extern declaration into its corresponding header file.mpi2013-05-171-4/+1
|
* Remove various external variable declaration from sources files andmpi2013-04-101-9/+1
| | | | | | | move them to the corresponding header with an appropriate comment if necessary. ok guenther@
* Correct the spelling of "transferred" and "transferring"guenther2012-02-241-3/+3
| | | | from Tobias Ulmer (tobiasu at tmux.org); ok jmc@, krw@
* When used with socket splicing, tcp_usrreq() might get called withbluhm2012-01-031-2/+6
| | | | | | | | a socket that has an inp but tp is NULL. The call stack for that is tcp_input() tcp_close() soisdisconnected() sorwakeup() somove() tcp_usrreq(PRU_RCVD). To avoid a NULL dereference, just return in that case. ok henning@
* Add sysctl net.inet.tcp.always_keepalive, when this is set the systemsthen2011-07-061-1/+5
| | | | | | | | | | | behaves as if SO_KEEPALIVE was set on all TCP sockets, forcing keepalives to be sent every net.inet.tcp.keepidle half-seconds. In conjunction with a keepidle value greatly reduced from the default, this can be useful for keeping sessions open if you are stuck on a network with short NAT or firewall timeouts. Feedback from various people, ok henning@ claudio@
* Make in_broadcast() rdomain aware. Mostly mechanical change.claudio2011-04-281-2/+3
| | | | | | This fixes the problem of binding sockets to broadcast IPs in other rdomains. OK henning@
* Correctly inherit and set the watermarks on socketbuffers.claudio2011-04-041-11/+5
| | | | | | This fixes the NFS problems reported on the mailing list and ensures that accepted sockets have correct socketbuffer setting. OK blambert@, henning@
* In tcp_update_sndspace() and tcp_update_rcvspace() change the typebluhm2010-10-101-3/+3
| | | | | | of the variable nmax from int to u_long as the socket buffer sizes it operates on are also u_long. ok claudio@
* Fix a unfinished comment and add another one for tcp_update_(snd|rcv)space().claudio2010-09-291-2/+9
| | | | Reminded by naddy@
* TCP send and recv buffer scaling.claudio2010-09-241-3/+71
| | | | | | | | | | | | | | | | | 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@
* There is no reason to allow unicast IPv4 mapped IPv6 addresses in tcpclaudio2010-06-071-5/+2
| | | | | | connect() calls. Our network stack does not allow any v4 mapped addresses so there is no need to allow them in connect(). Found after discussion with Henning. OK deraadt@
* remove proc.h include from uvm_map.h. This has far reaching effects, astedu2010-04-201-1/+2
| | | | | | sysctl.h was reliant on this particular include, and many drivers included sysctl.h unnecessarily. remove sysctl.h or add proc.h as needed. ok deraadt
* Initial support for routing domains. This allows to bind interfaces toclaudio2009-06-051-9/+4
| | | | | | | | | 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@
* Remove {tcp/udp}6_usrreq(); Since the normal ones nowthib2008-05-241-14/+1
| | | | | | | take a proc argument, theres no need for these, since they are just wrappers. OK claudio@
* Deal with the situation when TCP nfs mounts timeout and processesthib2008-05-231-9/+10
| | | | | | | | | | | | | 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.
* divert for ipv6; ok henning, pyrmarkus2008-05-151-2/+2
|
* divert packets to local socket without modifying the ip header;markus2008-05-091-2/+2
| | | | makes transparent proxies much easier; ok beck@, feedback claudio@
* implement sysctls to report IP, TCP, UDP, and ICMP statistics andreyk2007-12-131-1/+8
| | | | | | | | change netstat to use them instead of accessing kvm for it. more protocols will be added later. discussed with deraadt@ claudio@ gilles@ ok deraadt@
* TCP_COMPAT_42 was last used in 1997. Kill it.deraadt2007-11-271-6/+1
| | | | ok millert
* in the strange/unnatural/ridiculous situation where a non-blockingderaadt2007-11-161-2/+5
| | | | | | | connect() which has completed and failed.. if connect() is called again.. return the so_error instead of EINVAL; from Alexey Vatchenko matches what other systems do now ok millert henning
* since thehenning2007-09-011-1/+2
| | | | | | MGET* macros were changed to function calls, there wasn't any need for the pool declarations and the inclusion of pool.h From: tbert <bret.lambert@gmail.com>
* merge tcp_set_iss() and tcp_set_tsm(); ok mcbride, djm (on earlier version)markus2007-06-251-6/+2
|
* Drop the current random timestamps and the current ISN generationmarkus2007-06-151-3/+3
| | | | | | | code and replace both with a RFC1948 based method, so TCP clients now have monotonic ISN/timestamps. The server side uses completely random ISN/timestamps and does time-wait recycling (on port reuse). ok djm@, mcbride@; thanks to lots of testers
* - check th_ack against snd_una/max; from Raja Mukerji via hugh@markus2005-03-041-1/+15
| | | | | | | - limit pool to tcp_sackhole_limit entries (sysctl-able) - stop sack option processing on pool_get errors - use SEQ_MIN/SEQ_MAX ok henning, hshoexer, deraadt
* Move #ifdef INET6 outside of 'case AF_INET6:' in tcp_ident().mcbride2005-02-221-2/+2
| | | | | | | No functional change due to earlier check, fix from Maxim Konovalov <maxim@macomnet.ru> ok deraadt@ dhartmei@
* Modulate tcp_now by a random amount on a per-connection basis.mcbride2004-10-281-1/+8
| | | | ok markus@ frantzen@
* tcp_trace() expects short, not int; ok deraadtmarkus2004-07-151-2/+2
|
* Require NULL oldp when dropping a connection.otto2004-04-271-5/+7
| | | | ok markus@
* change tcpdrop to require newp instead of oldp; suggested by ottomarkus2004-04-261-12/+13
|
* add TCPCTL_DROP; ok deraadt, cedric, grange, ...markus2004-04-251-6/+31
|
* remove duplicate if. from pedro martelletto, ok markus@tedu2004-04-121-8/+2
|
* limit total number of queued out-of-order packets to NMBCLUSTERS/2; ok mcbridemarkus2004-03-021-1/+14
|
* switch to sysctl_int_arr(); ok itojun, henning, miod, deraadtmarkus2004-02-151-48/+15
|
* rename tcp sockopt TCP_SIGNATURE_ENABLE to TCP_MD5SIGhenning2004-01-311-3/+3
| | | | | requested by theo ok markus@ hshoexer@
* !sack_disable -> sack_enable; ok deraadt@markus2004-01-311-7/+7
|
* add support for getsockopt(..., TCP_SIGNATURE_ENABLEhenning2004-01-301-1/+6
| | | | | | so you can check wether a just accept()ed connection is md5sig'd ok deraadt@ markus@
* support for RFC3390 (Increasing TCP's Initial Window); ok deraadt, itojunmarkus2004-01-291-1/+4
|
* import netbsd's version of David Borman's syncache codemarkus2004-01-061-1/+7
| | | | http://www.kohala.com/start/borman.97jun06.txt; ok deraadt@, henning@
* de-register. deraadt okitojun2003-12-101-9/+9
|
* Mbuf tag tcp and udp packets which are translated to localhost, andmcbride2003-12-081-3/+3
| | | | | | | | | | | | | use the the presence of this tag to reverse the match order in in{6}_pcblookup_listen(). Some daemons (such as portmap) do a double bind, binding to both * and localhost in order to differentiate local from non-local connections, and potentially granting more privilege to local ones. This change ensures that redirected connections to localhost do not appear local to such a daemon. Bulk of changes from dhartmei@, some changes markus@ ok dhartmei@ deraadt@
* add in(6)_pcblookup_listen() and replace all calls to in_pcblookup()markus2003-11-041-7/+5
| | | | | | with either in(6)_pcbhashlookup() or in(6)_pcblookup_listen(); in_pcblookup is now only used by bind(2); speeds up pcb lookup for listening sockets; from Claudio Jeker