summaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_output.c
diff options
context:
space:
mode:
authorArchie Cobbs <archie@FreeBSD.org>2000-08-03 23:23:36 +0000
committerArchie Cobbs <archie@FreeBSD.org>2000-08-03 23:23:36 +0000
commit7734ea0612eb4100daa67bce2630bfb992fe9156 (patch)
treef808bf2c578ac24664a72e4dce06a35811aa6896 /sys/netinet/tcp_output.c
parentb088fe8c8ff84b5c791e214334a27579d0627595 (diff)
Notes
Diffstat (limited to 'sys/netinet/tcp_output.c')
-rw-r--r--sys/netinet/tcp_output.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index 089c7ea6644a..0f889b481b5a 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -864,6 +864,21 @@ send:
(so->so_options & SO_DONTROUTE), 0);
}
if (error) {
+
+ /*
+ * We know that the packet was lost, so back out the
+ * sequence number advance, if any.
+ */
+ if (tp->t_force == 0 || !callout_active(tp->tt_persist)) {
+ /*
+ * No need to check for TH_FIN here because
+ * the TF_SENTFIN flag handles that case.
+ */
+ if (flags & TH_SYN)
+ tp->snd_nxt--;
+ tp->snd_nxt -= len;
+ }
+
out:
if (error == ENOBUFS) {
if (!callout_active(tp->tt_rexmt) &&