summaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_input.c
Commit message (Collapse)AuthorAgeFilesLines
* This commit was manufactured by cvs2svn to create tagrelease/2.2.1_cvscvs2svn1997-03-271-1/+1
| | | | | | | 'RELENG_2_2_1_RELEASE'. This commit was manufactured to restore the state of the 2.2.1-RELEASE image. Releases prior to 5.3-RELEASE are omitting the secure/ and crypto/ subdirs.
* Merge from -currentPoul-Henning Kamp1996-11-111-3/+1
| | | | Notes: svn path=/stable/2.2/; revision=19661
* Fix two bugs I accidently put into the syn code at the last minutePaul Traina1996-10-111-5/+9
| | | | | | | | | | | | | (yes I had tested the hell out of this). I've also temporarily disabled the code so that it behaves as it previously did (tail drop's the syns) pending discussion with fenner about some socket state flags that I don't fully understand. Submitted by: fenner Notes: svn path=/head/; revision=18874
* Improved in_pcblookuphash() to support wildcarding, and changed relaventDavid Greenman1996-10-071-12/+2
| | | | | | | | | | | | | callers of it to take advantage of this. This reduces new connection request overhead in the face of a large number of PCBs in the system. Thanks to David Filo <filo@yahoo.com> for suggesting this and providing a sample implementation (which wasn't used, but showed that it could be done). Reviewed by: wollman Notes: svn path=/head/; revision=18795
* Increase robustness of FreeBSD against high-rate connection attemptPaul Traina1996-10-071-13/+23
| | | | | | | | | | denial of service attacks. Reviewed by: bde,wollman,olah Inspired by: vjs@sgi.com Notes: svn path=/head/; revision=18787
* I don't understand, I committed this fix (move a counter and fixed a typo)Paul Traina1996-09-211-4/+3
| | | | | | | | | this evening. I think I'm going insane. Notes: svn path=/head/; revision=18437
* Syntax error: so_incom -> so_incompAndrey A. Chernov1996-09-211-2/+2
| | | | Notes: svn path=/head/; revision=18436
* If the incomplete listen queue for a given socket is full,Paul Traina1996-09-201-5/+18
| | | | | | | | | | | | | | | | | | | | drop the oldest entry in the queue. There was a fair bit of discussion as to whether or not the proper action is to drop a random entry in the queue. It's my conclusion that a random drop is better than a head drop, however profiling this section of code (done by John Capo) shows that a head-drop results in a significant performance increase. There are scenarios where a random drop is more appropriate. If I find one in reality, I'll add the random drop code under a conditional. Obtained from: discussions and code done by Vernon Schryver (vjs@sgi.com). Notes: svn path=/head/; revision=18431
* Make the misnamed tcp initial keepalive timer value (which is really thePaul Traina1996-09-131-3/+3
| | | | | | | | | | | time, in seconds, that state for non-established TCP sessions stays about) a sysctl modifyable variable. [part 1 of two commits, I just realized I can't play with the indices as I was typing this commit message.] Notes: svn path=/head/; revision=18280
* Receipt of two SYN's are sufficient to set the t_timer[TCPT_KEEP]Paul Traina1996-09-131-6/+12
| | | | | | | | | | | to "keepidle". this should not occur unless the connection has been established via the 3-way handshake which requires an ACK Submitted by: jmb Obtained from: problem discussed in Stevens vol. 3 Notes: svn path=/head/; revision=18278
* Back out my stupid braino; I was thinking strlen and not sizeof.Bill Fenner1996-05-021-2/+2
| | | | Notes: svn path=/head/; revision=15525
* Size temp var correctly; buf[4*sizeof "123"] is not long enoughBill Fenner1996-05-021-2/+2
| | | | | | | to store "192.252.119.189\0". Notes: svn path=/head/; revision=15524
* inet_ntoa buffer was evaluated twice in log_in_vain, fix it.Andrey A. Chernov1996-04-271-3/+7
| | | | | | | Thanx to: jdp Notes: svn path=/head/; revision=15414
* Delete #ifdef notdef blocks containing old method of srtt calculation.Garrett Wollman1996-04-261-48/+1
| | | | | | | Requested by: davidg Notes: svn path=/head/; revision=15396
* Logging UDP and TCP connection attempts should not be enabled by default.Paul Traina1996-04-091-2/+2
| | | | | | | | | It's trivial to create a denial of service attack on a box so enabled. These messages, if enabled at all, must be rate-limited. (!) Notes: svn path=/head/; revision=15154
* Log TCP syn packets for ports we don't listen on.Poul-Henning Kamp1996-04-041-2/+13
| | | | | | | | | | | | Controlled by: sysctl net.inet.tcp.log_in_vain: 1 Log UDP syn packets for ports we don't listen on. Controlled by: sysctl net.inet.udp.log_in_vain: 1 Suggested by: Warren Toomey <wkt@cs.adfa.oz.au> Notes: svn path=/head/; revision=15038
* Slight modification of RTO floor calculation.Garrett Wollman1996-03-251-2/+2
| | | | Notes: svn path=/head/; revision=14819
* A number of performance-reducing flaws fixed based on commentsGarrett Wollman1996-03-221-3/+54
| | | | | | | | | | | | | | | | | | | from Larry Peterson &co. at Arizona: - Header prediction for ACKs did not exclude Fast Retransmit/Recovery. - srtt calculation tended to get ``stuck'' and could never decrease when below 8. It still can't, but the scaling factors are adjusted so that this artifact does not cause as bad an effect on the RTO value as it used to. The paper also points out the incr/8 error that has been long since fixed, and the problems with ACKing frequency resulting from the use of options which I suspect to be fixed already as well (as part of the T/TCP work). Obtained from: Brakmo & Peterson, ``Performance Problems in BSD4.4 TCP'' Notes: svn path=/head/; revision=14753
* Move or add #include <queue.h> in preparation for upcoming struct socketDavid Greenman1996-03-111-2/+2
| | | | | | | changes. Notes: svn path=/head/; revision=14546
* Add a counter for the number of times the listen queue was overflowed toGuido van Rooij1996-02-261-2/+4
| | | | | | | | | the tcpstat structure. (netstat -s) Reviewed by: wollman Obtained from: Steves, TCP/IP Ill. vol.3, page 189 Notes: svn path=/head/; revision=14268
* Fixed bug in Path MTU Discovery that caused the system to have to re-David Greenman1996-02-221-24/+4
| | | | | | | | | | discover the Path MTU for each connection if the connecting host didn't offer an initial MSS. Submitted by: davidg & olah Notes: svn path=/head/; revision=14181
* Fix a bug related to the interworking of T/TCP and window scaling:Andras Olah1996-01-311-6/+19
| | | | | | | | | | | | | | | | | | when a connection enters the ESTBLS state using T/TCP, then window scaling wasn't properly handled. The fix is twofold. 1) When the 3WHS completes, make sure that we update our window scaling state variables. 2) When setting the `virtual advertized window', then make sure that we do not try to offer a window that is larger than the maximum window without scaling (TCP_MAXWIN). Reviewed by: davidg Reported by: Jerry Chen <chen@Ipsilon.COM> Notes: svn path=/head/; revision=13779
* Another mega commit to staticize things.Poul-Henning Kamp1995-12-141-2/+2
| | | | Notes: svn path=/head/; revision=12820
* New style sysctl & staticize alot of stuff.Poul-Henning Kamp1995-11-141-6/+15
| | | | Notes: svn path=/head/; revision=12296
* Start adding new style sysctl here too.Poul-Henning Kamp1995-11-091-1/+5
| | | | Notes: svn path=/head/; revision=12172
* Cosmetic changes to processing of segments in the SYN_SENT state:Andras Olah1995-11-031-10/+10
| | | | | | | | | | | - remove a redundant condition; - complete all validity checks on segment before calling soisconnected(so). Reviewed by: Richard Stevens, davidg, wollman Notes: svn path=/head/; revision=12047
* Routes can be asymmetric. Always offer to /accept/ an MSS of up to theGarrett Wollman1995-10-131-7/+1
| | | | | | | | | capacity of the link, even if the route's MTU indicates that we cannot send that much in their direction. (This might actually make it possible to test Path MTU discovery in a useful variety of cases.) Notes: svn path=/head/; revision=11458
* Finish 4.4-Lite-2 merge: randomize TCP initial sequence numbersGarrett Wollman1995-10-031-6/+8
| | | | | | | to make ISS-guessing spoofing attacks harder. Notes: svn path=/head/; revision=11150
* Remove a redundant `if' from tcp_reass().Andras Olah1995-07-311-4/+2
| | | | | | | | | Correct a typo in a comment (SEND_SYN -> NEEDSYN). Reviewed by: David Greenman Notes: svn path=/head/; revision=9818
* tcp_input.c - keep track of how many times a route contained a cached rttGarrett Wollman1995-07-101-7/+7
| | | | | | | | | | | | or ssthresh that we were able to use tcp_var.h - declare tcpstat entries for above; declare tcp_{send,recv}space in_rmx.c - fill in the MTU and pipe sizes with the defaults TCP would have used anyway in the absence of values here Notes: svn path=/head/; revision=9470
* Keep track of the number of samples through the srtt filter so that weGarrett Wollman1995-06-291-1/+2
| | | | | | | | | know better when to cache values in the route, rather than relying on a heuristic involving sequence numbers that broke when tcp_sendspace was increased to 16k. Notes: svn path=/head/; revision=9373
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-35/+35
| | | | Notes: svn path=/head/; revision=8876
* #ifdef'd my Nagel/ACK hack with "TCP_ACK_HACK", disabled by default. I'mDavid Greenman1995-05-111-1/+24
| | | | | | | | | | | currently considering reducing the TCP fasttimo to 100ms to help improve things, but this would be done as a seperate step at some point in the future. This was done because it was causing some sometimes serious performance problems with T/TCP. Notes: svn path=/head/; revision=8429
* Fix a misspelled constant in tcp_input.c.Andras Olah1995-05-091-2/+2
| | | | | | | | | | | | | | | | | | | | On Tue, 09 May 1995 04:35:27 PDT, Richard Stevens wrote: > In tcp_dooptions() under the case TCPOPT_CC there is an assignment > > to->to_flag |= TCPOPT_CC; > > that should be > > to->to_flag |= TOF_CC; > > I haven't thought through the ramifications of what's been happening ... > > Rich Stevens Submitted by: rstevens@noao.edu (Richard Stevens) Notes: svn path=/head/; revision=8377
* Changed in_pcblookuphash() to not automatically call in_pcblookup() ifDavid Greenman1995-05-031-3/+14
| | | | | | | | | the lookup fails. Updated callers to deal with this. Call in_pcblookuphash instead of in_pcblookup() in in_pcbconnect; this improves performance of UDP output by about 17% in the standard case. Notes: svn path=/head/; revision=8235
* Further satisfy my paranoia by making sure that the ACKNOW is onlyDavid Greenman1995-04-101-10/+5
| | | | | | | set when ti_len is non-zero. Notes: svn path=/head/; revision=7738
* Fixed bug I introduced with my Nagel hack which caused tcp_input andDavid Greenman1995-04-101-3/+3
| | | | | | | | tcp_output to loop endlessly. This was freefall's problem during the past day. Notes: svn path=/head/; revision=7737
* Implemented PCB hashing. Includes new functions in_pcbinshash, in_pcbrehash,David Greenman1995-04-091-14/+6
| | | | | | | and in_pcblookuphash. Notes: svn path=/head/; revision=7684
* Fix a bug in tcp_input reported by Rick Jones <raj@hpisrdq.cup.hp.com>.Andras Olah1995-04-051-11/+8
| | | | | | | | | | If a goto findpcb occurred during the processing of a segment, the TCP and IP headers were dropped twice from the mbuf which resulted in data acked by TCP but not delivered to the user. Reviewed by: davidg Notes: svn path=/head/; revision=7634
* Re-apply my "breakage" to the Nagel congestion avoidence. This versionDavid Greenman1995-03-271-2/+20
| | | | | | | | differs slightly in the logic from the previous version; packets are now acked immediately if the sender set PUSH. Notes: svn path=/head/; revision=7417
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'Bruce Evans1995-03-161-4/+1
| | | | | | | | | (except in netccitt, netiso and netns) and most of the warnings from `gcc -Wnested-externs'. Fix all the bugs found. There were no serious ones. Notes: svn path=/head/; revision=7090
* Avoid deadlock situation described by Stevens using his suggested replacementGarrett Wollman1995-02-161-30/+20
| | | | | | | | | code. Obtained from: Stevens, vol. 2, pp. 959-960 Notes: svn path=/head/; revision=6480
* Transaction TCP support now standard. Hack away!Garrett Wollman1995-02-161-189/+1
| | | | Notes: svn path=/head/; revision=6475
* YFfix.Poul-Henning Kamp1995-02-141-2/+1
| | | | Notes: svn path=/head/; revision=6363
* Get rid of some unneeded #ifdef TTCP lines. Also, get rid of someGarrett Wollman1995-02-141-1/+6
| | | | | | | bogus commons declared in header files. Notes: svn path=/head/; revision=6348
* Merge Transaction TCP, courtesy of Andras Olah <olah@cs.utwente.nl> andGarrett Wollman1995-02-091-102/+680
| | | | | | | | | | | | Bob Braden <braden@isi.edu>. NB: This has not had David's TCP ACK hack re-integrated. It is not clear what the correct solution to this problem is, if any. If a better solution doesn't pop up in response to this message, I'll put David's code back in (or he's welcome to do so himself). Notes: svn path=/head/; revision=6283
* As suggested by Sally Floyd, don't add the ``small fraction of the windowGarrett Wollman1994-10-131-5/+3
| | | | | | | | | size'' when doing congestion avoidance. Submitted by: Mark Andrews Notes: svn path=/head/; revision=3561
* GCC cleanup.Poul-Henning Kamp1994-10-021-5/+6
| | | | | | | | | Reviewed by: Submitted by: Obtained from: Notes: svn path=/head/; revision=3311
* Made TCPDEBUG truely optional. Based on changes I made in FreeBSD 1.1.5.David Greenman1994-09-151-3/+13
| | | | | | | | Fixed somebody's idea of a joke - about the first half of the lines in in_proto.c were spaced over by one space. Notes: svn path=/head/; revision=2788
* Obey RFC 793, section 3.4:Garrett Wollman1994-08-261-2/+2
| | | | | | | | | | | | Several examples of connection initiation follow. Although these examples do not show connection synchronization using data-carrying segments, this is perfectly legitimate, so long as the receiving TCP doesn't deliver the data to the user until it is clear the data is valid (i.e., the data must be buffered at the receiver until the connection reaches the ESTABLISHED state). Notes: svn path=/head/; revision=2304