Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/sys/netinet Pull up following revision(s) (requested by m...
details: https://anonhg.NetBSD.org/src/rev/4141daf48026
branches: netbsd-7
changeset: 799499:4141daf48026
user: martin <martin%NetBSD.org@localhost>
date: Fri Jul 24 07:30:40 2015 +0000
description:
Pull up following revision(s) (requested by matt in ticket #886):
sys/netinet/tcp_output.c: revision 1.184
sys/netinet/tcp_input.c: revision 1.343
If we are sending a window probe and there's unacked data in the
socket, make sure at least the persist timer is running.
Make sure that snd_win doesn't go negative.
diffstat:
sys/netinet/tcp_input.c | 9 ++++++---
sys/netinet/tcp_output.c | 26 ++++++++++++++++++--------
2 files changed, 24 insertions(+), 11 deletions(-)
diffs (79 lines):
diff -r 06f3f41d869b -r 4141daf48026 sys/netinet/tcp_input.c
--- a/sys/netinet/tcp_input.c Thu Jul 23 18:45:15 2015 +0000
+++ b/sys/netinet/tcp_input.c Fri Jul 24 07:30:40 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tcp_input.c,v 1.334.2.1 2015/02/21 13:40:19 martin Exp $ */
+/* $NetBSD: tcp_input.c,v 1.334.2.2 2015/07/24 07:30:40 martin 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.334.2.1 2015/02/21 13:40:19 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.334.2.2 2015/07/24 07:30:40 martin Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@@ -2714,7 +2714,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);
diff -r 06f3f41d869b -r 4141daf48026 sys/netinet/tcp_output.c
--- a/sys/netinet/tcp_output.c Thu Jul 23 18:45:15 2015 +0000
+++ b/sys/netinet/tcp_output.c Fri Jul 24 07:30:40 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tcp_output.c,v 1.176.2.4 2015/02/21 13:40:19 martin Exp $ */
+/* $NetBSD: tcp_output.c,v 1.176.2.5 2015/07/24 07:30:40 martin Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -135,7 +135,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_output.c,v 1.176.2.4 2015/02/21 13:40:19 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_output.c,v 1.176.2.5 2015/07/24 07:30:40 martin Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@@ -1522,14 +1522,24 @@
* of retransmit time.
*/
timer:
- if (TCP_TIMER_ISARMED(tp, TCPT_REXMT) == 0 &&
- ((sack_rxmit && tp->snd_nxt != tp->snd_max) ||
- tp->snd_nxt != tp->snd_una)) {
- if (TCP_TIMER_ISARMED(tp, TCPT_PERSIST)) {
- TCP_TIMER_DISARM(tp, TCPT_PERSIST);
+ if (TCP_TIMER_ISARMED(tp, TCPT_REXMT) == 0) {
+ if ((sack_rxmit && tp->snd_nxt != tp->snd_max)
+ || tp->snd_nxt != tp->snd_una) {
+ if (TCP_TIMER_ISARMED(tp, TCPT_PERSIST)) {
+ TCP_TIMER_DISARM(tp, TCPT_PERSIST);
+ tp->t_rxtshift = 0;
+ }
+ TCP_TIMER_ARM(tp, TCPT_REXMT, tp->t_rxtcur);
+ } else if (len == 0 && so->so_snd.sb_cc > 0
+ && TCP_TIMER_ISARMED(tp, TCPT_PERSIST) == 0) {
+ /*
+ * If we are sending a window probe and there's
+ * unacked data in the socket, make sure at
+ * least the persist timer is running.
+ */
tp->t_rxtshift = 0;
+ tcp_setpersist(tp);
}
- TCP_TIMER_ARM(tp, TCPT_REXMT, tp->t_rxtcur);
}
} else
if (SEQ_GT(tp->snd_nxt + len, tp->snd_max))
Home |
Main Index |
Thread Index |
Old Index