diff options
author | Jonathan Lemon <jlemon@FreeBSD.org> | 2003-02-19 21:18:23 +0000 |
---|---|---|
committer | Jonathan Lemon <jlemon@FreeBSD.org> | 2003-02-19 21:18:23 +0000 |
commit | 3bfd6421c2ae8aca85759b11c187f5b8a35089d9 (patch) | |
tree | 5fd0290a91d0e3b84e43be4acc5477d4dc970210 /sys/netinet/tcp_output.c | |
parent | ec20bdf89733e5e7fcbbe27aeb14e98122287a65 (diff) | |
download | src-3bfd6421c2ae8aca85759b11c187f5b8a35089d9.tar.gz src-3bfd6421c2ae8aca85759b11c187f5b8a35089d9.zip |
Clean up delayed acks and T/TCP interactions:
- delay acks for T/TCP regardless of delack setting
- fix bug where a single pass through tcp_input might not delay acks
- use callout_active() instead of callout_pending()
Sponsored by: DARPA, NAI Labs
Notes
Notes:
svn path=/head/; revision=111139
Diffstat (limited to 'sys/netinet/tcp_output.c')
-rw-r--r-- | sys/netinet/tcp_output.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 34b0d844a94b..a917ed31611c 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -339,8 +339,9 @@ again: * next expected input). If the difference is at least two * max size segments, or at least 50% of the maximum possible * window, then want to send a window update to peer. + * Skip this if the connection is in T/TCP half-open state. */ - if (win > 0) { + if (win > 0 && !(tp->t_flags & TF_NEEDSYN)) { /* * "adv" is the amount we can increase the window, * taking into account that we are limited by @@ -965,8 +966,8 @@ out: if (win > 0 && SEQ_GT(tp->rcv_nxt+win, tp->rcv_adv)) tp->rcv_adv = tp->rcv_nxt + win; tp->last_ack_sent = tp->rcv_nxt; - tp->t_flags &= ~TF_ACKNOW; - if (tcp_delack_enabled) + tp->t_flags &= ~(TF_ACKNOW | TF_DELACK); + if (callout_active(tp->tt_delack)) callout_stop(tp->tt_delack); #if 0 /* |