Module Name: src
Committed By: matt
Date: Fri Jul 24 04:31:21 UTC 2015
Modified Files:
src/sys/netinet: tcp_input.c
Log Message:
Make sure that snd_win doesn't go negative.
To generate a diff of this commit:
cvs rdiff -u -r1.342 -r1.343 src/sys/netinet/tcp_input.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/netinet/tcp_input.c
diff -u src/sys/netinet/tcp_input.c:1.342 src/sys/netinet/tcp_input.c:1.343
--- src/sys/netinet/tcp_input.c:1.342 Wed Jul 15 09:20:18 2015
+++ src/sys/netinet/tcp_input.c Fri Jul 24 04:31:20 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tcp_input.c,v 1.342 2015/07/15 09:20:18 ozaki-r Exp $ */
+/* $NetBSD: tcp_input.c,v 1.343 2015/07/24 04:31:20 matt Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -148,7 +148,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.342 2015/07/15 09:20:18 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.343 2015/07/24 04:31:20 matt Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@@ -2713,7 +2713,10 @@ after_listen:
tp->t_lastm = NULL;
sbdrop(&so->so_snd, acked);
tp->t_lastoff -= acked;
- tp->snd_wnd -= acked;
+ if (tp->snd_wnd > acked)
+ tp->snd_wnd -= acked;
+ else
+ tp->snd_wnd = 0;
ourfinisacked = 0;
}
sowwakeup(so);