Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet Make sure that snd_win doesn't go negative.
details: https://anonhg.NetBSD.org/src/rev/50e70aa49e12
branches: trunk
changeset: 339469:50e70aa49e12
user: matt <matt%NetBSD.org@localhost>
date: Fri Jul 24 04:31:20 2015 +0000
description:
Make sure that snd_win doesn't go negative.
diffstat:
sys/netinet/tcp_input.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 876e4e42b40e -r 50e70aa49e12 sys/netinet/tcp_input.c
--- a/sys/netinet/tcp_input.c Fri Jul 24 04:29:27 2015 +0000
+++ b/sys/netinet/tcp_input.c Fri Jul 24 04:31:20 2015 +0000
@@ -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 @@
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);
Home |
Main Index |
Thread Index |
Old Index