summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_input.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* ANSIfy function definitions.jsing2008-06-121-81/+26
| | | | ok markus@ mcbride@ henning@ deraadt@
* Fix type difference between function prototype and implementation.jsing2008-06-121-2/+2
| | | | | | | According to millert@ this would have been promoted from a short to an int anyway, since K&R C cannot pass variables that are smaller than an int. ok deraadt@ millert@
* 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@
* remove tcp_drain code since it's not longer used; ok henning, feedback thibmarkus2008-05-061-8/+1
|
* when creating a response, use the correct TCP header instead ofmarkus2008-02-201-4/+6
| | | | relying on the mbuf chain layout; with claudio@ and krw@; ok henning@
* The TCP server has to recalculate the client's window size takenbluhm2008-02-111-3/+2
| | | | | | | from the first ACK packet. Otherwise the server would use the unscaled window size for the fist data it is sending. ok markus@ dhartmei@
* TCP_COMPAT_42 was last used in 1997. Kill it.deraadt2007-11-271-6/+1
| | | | ok millert
* typos; ok jmc@martynas2007-11-271-2/+2
| | | | sys/dev/pci/pciide.c from naddy@
* 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>
* Drop the current random timestamps and the current ISN generationmarkus2007-06-151-18/+28
| | | | | | | 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
* there was code inside #if NPF > 0, but pf.h was not included, so it didhenning2007-06-111-7/+2
| | | | | | not get build. the code looks at flags that used to be in mbuf tags, now they are in the mbuf header, so we can check them unconditionally. problem spotted by Daniel Roethlisberger <daniel@roe.ch>, ok ryan markus
* apply the "skip ipsec if there are no flows" speedup diff to IPv6 too.henning2007-06-011-2/+2
| | | | | | 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
* diffs are better if compilers see them firstderaadt2007-05-271-3/+3
|
* take static off tcp_mss_adv.dlg2007-05-271-2/+4
| | | | ok reyk@
* When a partial ack is received check if congestion window is larger thanmichele2007-05-221-2/+7
| | | | | | | | acked bytes and update the window accordingly fix PR4278 OK henning@ markus@ claudio@
* whitespace fixitojun2007-02-131-2/+2
|
* allow RST with th_seq incremented (seen from windows tcp clients); ok dhartmeimarkus2006-12-111-2/+3
|
* make the syncache code respect (inherit) the ttl from the listening sockethenning2006-12-051-5/+5
| | | | when sending the synack response. ok markus
* do not re-generate the timestamp modulation offset for SYN-ACK retransmits;markus2006-10-311-3/+4
| | | | this unbreaks TCP for high RTT (~3s); ok mcbride@
* implement IP_MINTTL socket option fo tcp socketshenning2006-10-111-1/+5
| | | | | | | | This is for RFC3682 aka the TTL security hack - sender sets TTL to 255, receiver checks no router on the way (or, no more than expected) reduced the TTL. carp uses that technique already. modeled after FreeBSD implementation. ok claudio djm deraadt
* mbuf use-after-free; ok henning, djm, bradmarkus2006-03-121-2/+6
|
* unbreak tcp window update (restore 4.4lite code); netbsd pr 13952;markus2006-02-261-4/+5
| | | | ok claudio, henning, brad, djm, tedu
* allow RST if the th_seq matches rcv_nxt in case the RST follows themarkus2005-12-011-2/+3
| | | | | data immediately. otherwise we would ignore RST for delayed acks; ok deraadt, dhartmei
* Only two `h' in threshold.miod2005-11-151-2/+2
|
* inherit sack_enable from the listen socket, this should allow connectionsmarkus2005-11-021-2/+2
| | | | with both sack and md5 options in SYN.
* make pf use one mbuf tag instead of 6 distinct ones. use a little structhenning2005-10-171-5/+11
| | | | | | | | | in the data part for the data from the previously distinct tags. look up the tag early and carry a pointer to it around. makes the code easier and saves some tag lookups and thus helps performance, as proven by tests run by Schberle Dniel <Schoeberle.Daniel@aamtech.hu> Initially hacked up somewhere over the atlantic ocean in an A330 early testing reyk and moritz, "put it in" theo
* don't accept SYN-only TCP options for established connections;markus2005-08-111-10/+19
| | | | cf FreeBSD-SA-05:15.tcp; ok claudio, mcbride
* change the TCP reass queue from LIST to TAILQ;markus2005-08-021-32/+30
| | | | ok henning claudio fgsch krw
* implement PMTU checks frommarkus2005-06-301-1/+69
| | | | | | | 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.
* csum -> csum_flagsbrad2005-04-251-4/+4
| | | | ok krw@ canacar@
* add tcp sack stats, similar to freebsd; ok deraadtmarkus2005-04-051-2/+3
|
* make sure code and comment matchmarkus2005-03-121-4/+8
|
* from freebsd:markus2005-03-091-16/+10
| | | | | | 1. set rcv_laststart/rcv_lastend after checking the tcp window 2. pass rcv_laststart and rcv_lastend on the stack (shrink tcp state) ok henning, djm
* - check th_ack against snd_una/max; from Raja Mukerji via hugh@markus2005-03-041-17/+27
| | | | | | | - 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-20/+20
| | | | | | | | | | | 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-7/+17
| | | | | | | | | | - 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@
* handle rtt < 0; markus okderaadt2004-12-301-1/+4
|
* fix indentmarkus2004-12-291-2/+2
|
* fix for race between invocation for timer and network inputmarkus2004-11-251-2/+20
| | | | | | 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/+8
| | | | ok markus@ frantzen@
* account for linkhdr size when choosing mbufs vs mbuf clustersderaadt2004-09-221-2/+2
| | | | ok dhartmei markus claudio henning mcbride ...
* undo 1.148, otherwise we have assymmetric cwnd when entering ESTABLISHED:markus2004-07-161-1/+10
| | | | 2mss on the server side, and 1mss on the client.
* remove #ifdef TUBAitojun2004-06-201-8/+1
|
* Calculate optp (pointer to beginning of TCP options) based on th, notdhartmei2004-06-141-2/+2
| | | | | mtod(m), since the previous IP6_EXTHDR_GET() only guarantees this part to be continuous. Report from Andreas Bartelt. ok markus@, itojun@
* factor out md5 code; ok+tests henning@, djm@, hshoexer@markus2004-06-081-128/+10
|
* simplify; ok henning, itojunmarkus2004-05-311-8/+4
|
* the tcp header might be in a different mbuf after pulldown();markus2004-05-271-3/+1
| | | | fixes tcp corruption on rl(4); ok itojun, cedric
* use sa_family not inp; netbsd merge error; ok dhartmeimarkus2004-05-261-2/+2
|
* use 'mss' as lower limit, since 'ifp' might not be set; ok dhartmei@, henning@markus2004-05-211-5/+7
| | | | report and test by mpf@