summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_subr.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* "struct pkthdr" holds a routing table ID, not a routing domain one.mpi2014-04-141-4/+4
| | | | | | | | | | | | | | Avoid the confusion by using an appropriate name for the variable. Note that since routing domain IDs are a subset of the set of routing table IDs, the following idiom is correct: rtableid = rdomain But to get the routing domain ID corresponding to a given routing table ID, you must call rtable_l2(9). claudio@ likes it, ok mikeb@
* Remove the number of in6_var.h inclusions by moving some functions andmpi2013-10-241-3/+1
| | | | | | global variables to in6.h. ok deraadt@
* Remove the number of in_var.h inclusions by moving some functions andmpi2013-10-231-2/+1
| | | | | | global variables to in.h. ok mikeb@, deraadt@
* Sprinkle a lot more IPv6 routing domains support in the kernel.phessler2013-10-211-11/+6
| | | | | | | | | Mostly mechanical, setting and passing the rdomain and rtable correctly. Not yet enabled. Lots of help and hints from claudio and bluhm OK claudio@, bluhm@
* 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@
* make in_proto_cksum_out not rely on the pseudo header checksum to behenning2013-10-191-5/+2
| | | | | | | | | | already there, just compute it - it's dirt cheap. since that happens very late in ip_output, the rest of the stack doesn't have to care about checksums at all any more, if something needs to be checksummed, just set the flag on the pkthdr mbuf to indicate so. stop pre-computing the pseudo header checksum and incrementally updating it in the tcp and udp stacks. ok lteo florian
* Pass the routing domain to IPv6 pr_ctlinput() like in IPv4.bluhm2013-06-011-5/+2
| | | | OK claudio@
* The function rip6_ctlinput() claims that sa6_src is constant tobluhm2013-05-311-6/+6
| | | | | | | | | | allow the assingment of &sa6_any. But rip6_ctlinput() could not guarantee that as it casted away the const attribute when it passes the pointer to in6_pcbnotify(). Replace sockaddr with const sockaddr_in6 in the in6_pcbnotify() parameters. This reduces the number of casts. Also adjust in6_pcbhashlookup() to handle the const attribute correctly. Input and OK claudio@
* Remove various external variable declaration from sources files andmpi2013-04-101-6/+3
| | | | | | | move them to the corresponding header with an appropriate comment if necessary. ok guenther@
* Use macros sotoinpcb() and intotcpcb() instead of casts. Use NULLbluhm2013-04-021-4/+4
| | | | | instead of 0 for pointers. No binary change. OK mpi@
* code that calls timeout functions should include timeout.htedu2013-03-281-1/+2
| | | | | slipped by on i386, but the zaurus doesn't automagically pick it up. spotted by patrick
* no need for a lot of code to include proc.htedu2013-03-281-2/+1
|
* change the malloc(9) flags from M_DONTWAIT to M_NOWAIT; OK millert@gsoares2012-12-281-2/+2
|
* Increase TCP's initial window to 10 * MSS or 14600 bytes as proposed inclaudio2012-03-101-2/+2
| | | | | | draft-ietf-tcpm-initcwnd. net.inet.tcp.rfc3390 defaults to 2 now which uses the 10*MSS, setting it back to 1 brings back the old default of 4*MSS. OK sperreault@, henning@, sthen@, markus@
* for key material that is being being discarded, convert bzero() toderaadt2011-01-111-2/+2
| | | | | explicit_bzero() where required ok markus mikeb
* Fix the naming of interfaces and variables for rdomains and rtablesguenther2010-07-031-16/+7
| | | | | | | | | | | | 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
* Replace pool_get() + bzero() with pool_get(..., PR_ZERO).chl2010-01-151-3/+2
| | | | | | With input from oga@ and krw@ ok oga@ krw@ thib@ markus@ mk@
* Extend the protosw pr_ctlinput function to include the rdomain. This isclaudio2009-11-131-7/+15
| | | | | | | | needed so that the route and inp lookups done in TCP and UDP know where to look. Additionally in_pcbnotifyall() and tcp_respond() got a rdomain argument as well for similar reasons. With this tcp seems to be now fully rdomain save and no longer leaks single packets into the main domain. Looks good markus@, henning@
* rtables are stacked on rdomains (it is possible to have multiple routingclaudio2009-11-031-3/+2
| | | | | | | | | | | | | | tables on top of a rdomain) but until now our code was a crazy mix so that it was impossible to correctly use rtables in that case. Additionally pf(4) only knows about rtables and not about rdomains. This is especially bad when tracking (possibly conflicting) states in various domains. This diff fixes all or most of these issues. It adds a lookup function to get the rdomain id based on a rtable id. Makes pf understand rdomains and allows pf to move packets between rdomains (it is similar to NAT). Because pf states now track the rdomain id as well it is necessary to modify the pfsync wire format. So old and new systems will not sync up. A lot of help by dlg@, tested by sthen@, jsg@ and probably more OK dlg@, mpf@, deraadt@
* sockets created via a listening socket lose the rdomain and fail to workclaudio2009-08-101-3/+3
| | | | | | | therefore. Inherit the rdomain through the syncache. There are some interactions that need some more work (ctlinput) so this can be improved but is good enough for now. OK markus@
* Initial support for routing domains. This allows to bind interfaces toclaudio2009-06-051-4/+7
| | | | | | | | | 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@
* rename arc4random_bytes => arc4random_buf to match libc's nicer name;djm2008-06-091-2/+2
| | | | ok deraadt@
* remove tcp_drain code since it's not longer used; ok henning, feedback thibmarkus2008-05-061-22/+1
|
* remove old unused TCP isn code; ok henning, dhartmei, mcbridemarkus2008-02-201-48/+1
|
* when creating a response, use the correct TCP header instead ofmarkus2008-02-201-64/+52
| | | | relying on the mbuf chain layout; with claudio@ and krw@; ok henning@
* TCP_COMPAT_42 was last used in 1997. Kill it.deraadt2007-11-271-5/+1
| | | | ok millert
* arc4random_bytes() is the preferred interface for generating nonces;djm2007-09-181-2/+2
| | | | "looks ok" markus@
* 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-46/+13
|
* Drop the current random timestamps and the current ISN generationmarkus2007-06-151-7/+71
| | | | | | | 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
* apply the "skip ipsec if there are no flows" speedup diff to IPv6 too.henning2007-06-011-2/+3
| | | | | | we need a pointer to the inpcb to decide, which was not previously passed to ip6_output, so this diff is a little bigger. from itojun, ok ryan
* tcp_iss usage is ifdef TCP_COMPAT_42, so the variable decl can be tooderaadt2007-05-091-1/+3
|
* variables used by #ifdef code should be inside #ifdef tooderaadt2007-05-081-1/+5
|
* With the exception of two other small uncommited diffs this movesbrad2006-03-041-2/+2
| | | | | | the remainder of the network stack from splimp to splnet. ok miod@
* Enable RFC3390 by default and remove a few compile time options whichbrad2005-09-281-24/+5
| | | | | | can be changed via sysctl's. ok markus@
* change the TCP reass queue from LIST to TAILQ;markus2005-08-021-7/+7
| | | | ok henning claudio fgsch krw
* implement PMTU checks frommarkus2005-06-301-3/+40
| | | | | | | http://www.gont.com.ar/drafts/icmp-attacks-against-tcp.html i.e. don't act on ICMP-need-frag immediately if adhoc checks on the advertised mtu fail. the mtu update is delayed until a tcp retransmit happens. initial patch by Fernando Gont, tested by many.
* Ignore ICMP Source Quench messages meant for TCP connections. (Details infgont2005-05-241-17/+11
| | | | | http://www.gont.com.ar/drafts/icmp-attacks-against-tcp.html) ok markus frantzen
* - check th_ack against snd_una/max; from Raja Mukerji via hugh@markus2005-03-041-1/+5
| | | | | | | - 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
* 1. tcp_xmit_timer(): remove extra rtt decrement (t_rtttime is 0-basedmarkus2005-02-271-2/+3
| | | | | | | | | | | while t_rtt was 1-based), update callers 2. define and use TCP_RTT_BASE_SHIFT instead of the hardcoded 2. 3. add missing shifts when t_srtt/t_rttvar are used. 4. update the comments: t_srtt uses 5 bits of fraction (not 3) and t_rttvar uses 4 bits 5. remove obsolete/unused macros TCP_RTT_SCALE and TCP_RTTVAR_SCALE 6. make sure rttmin is not > TCPTV_REXMTMAX parts from netbsd, ok mcbride, henning
* Make sure bogus values don't make their way into tcp_xmit_timer() calculations.mcbride2005-01-101-2/+2
| | | | | | | | | | - Ignore ts_ecr if it is 0, or the resulting rtt is out of range. (use tp->t_rtttime instead) - Initialise tcp_now to 1, to avoid the 500ms window where a valid ts_ecr of 0 could be ignored. - Convert out-of-range rtt values to valid ones in tcp_xmit_timer(). ok frantzen@ markus@
* fix for race between invocation for timer and network inputmarkus2004-11-251-3/+18
| | | | | | 1) add a reaper for TCP and SYN cache states (cf. netbsd pr 20390) 2) additional check for TCP_TIMER_ISARMED(TCPT_REXMT) in tcp_timer_persist() with mickey@; ok deraadt@
* Modulate tcp_now by a random amount on a per-connection basis.mcbride2004-10-281-2/+1
| | | | ok markus@ frantzen@
* verify th_seq in icmp errors; report Fernando Gont; ok mcbride@, dhartmei@markus2004-08-101-31/+53
|
* First step towards more sane time handling in the kernel -- this changestholo2004-06-211-3/+3
| | | | | | | | things such that code that only need a second-resolution uptime or wall time, and used to get that from time.tv_secs or mono_time.tv_secs now get this from separate time_t globals time_second and time_uptime. ok art@ niklas@ nordin@
* factor out md5 code; ok+tests henning@, djm@, hshoexer@markus2004-06-081-1/+76
|
* Replace RSA-derived md5 code with code derived from Colin Plumb's PD version.millert2004-05-071-2/+2
| | | | | | This moves md5.c out of libkern and into sys/crypto where it belongs (as requested by markus@). Note that md5.c is still mandatory (dev/rnd.c uses it). Verified with IPsec + hmac-md5 and tcp md5sig. OK henning@ and hshoexer@
* The tcp specific routing metrics are almost never used so reduce the routingclaudio2004-05-041-111/+1
| | | | | | | table from these metrics. struct rt_msghdr used by the routing socket is not affected and so most userland apps don't need to be changed. some man page polishing by jmc@ OK henning@ markus@ theo@
* - allow the user to force the TCP mss below the fail-safe 216 with a lowfrantzen2004-04-261-8/+10
| | | | | | | | interface MTU. - break a tcp_output() -> tcp_mtudisc() -> tcp_output() infinite recursion when the TCP mss ends up larger than the interface MTU (when the if_mtu is smaller than the tcp header). connections will still stall feedback from itojun@, claudio@ and provos and testing from beck@
* limit total number of queued out-of-order packets to NMBCLUSTERS/2; ok mcbridemarkus2004-03-021-4/+8
|