summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_input.c
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1995-04-10 17:37:46 +0000
committerdg <dg@FreeBSD.org>1995-04-10 17:37:46 +0000
commit30e9776583b70f059368c8d44ad1436549dfe262 (patch)
tree6272af37ce2d42ddba1d4997d25112d4ba24dfaf /sys/netinet/tcp_input.c
parent95eb1b83650fc48928b4873ad31cc262e5fa081c (diff)
downloadFreeBSD-src-30e9776583b70f059368c8d44ad1436549dfe262.zip
FreeBSD-src-30e9776583b70f059368c8d44ad1436549dfe262.tar.gz
Further satisfy my paranoia by making sure that the ACKNOW is only
set when ti_len is non-zero.
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r--sys/netinet/tcp_input.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 71ef017..e97a986 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* From: @(#)tcp_input.c 8.5 (Berkeley) 4/10/94
- * $Id: tcp_input.c,v 1.19 1995/04/09 01:29:24 davidg Exp $
+ * $Id: tcp_input.c,v 1.20 1995/04/10 17:16:10 davidg Exp $
*/
#ifndef TUBA_INCLUDE
@@ -88,7 +88,10 @@ struct inpcbinfo tcbinfo;
if ((ti)->ti_seq == (tp)->rcv_nxt && \
(tp)->seg_next == (struct tcpiphdr *)(tp) && \
(tp)->t_state == TCPS_ESTABLISHED) { \
- tp->t_flags |= TF_DELACK; \
+ if (ti->ti_flags & TH_PUSH) \
+ tp->t_flags |= TF_ACKNOW; \
+ else \
+ tp->t_flags |= TF_DELACK; \
(tp)->rcv_nxt += (ti)->ti_len; \
flags = (ti)->ti_flags & TH_FIN; \
tcpstat.tcps_rcvpack++;\
@@ -1557,14 +1560,6 @@ dodata: /* XXX */
#endif
/*
- * If this is a short packet, then ACK now - with Nagel
- * congestion avoidance sender won't send more until
- * he gets an ACK.
- */
- if (tiflags & TH_PUSH)
- tp->t_flags |= TF_ACKNOW;
-
- /*
* Return any desired output.
*/
if (needoutput || (tp->t_flags & TF_ACKNOW))
OpenPOWER on IntegriCloud