Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Jun 2011 20:43:54 GMT
From:      Catalin Nicutar <cnicutar@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 195386 for review
Message-ID:  <201106262043.p5QKhsjU042945@skunkworks.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@195386?ac=10

Change 195386 by cnicutar@cnicutar_cronos on 2011/06/26 20:43:13

	Disable keepalives for connections using UTO (RFC 5482: "the
	keep-alive timer MUST be set to a value larger than that of the
	adopted USER TIMEOUT").

Affected files ...

.. //depot/projects/soc2011/cnicutar_tcputo_8/src/sys/netinet/tcp_timer.c#2 edit

Differences ...

==== //depot/projects/soc2011/cnicutar_tcputo_8/src/sys/netinet/tcp_timer.c#2 (text+ko) ====

@@ -301,6 +301,19 @@
 		return;
 	}
 	callout_deactivate(&tp->t_timers->tt_keep);
+	if ((tp->t_flags & TF_SND_UTO) || ((tp->t_flags & TF_RCV_UTO) &&
+	    tp->rcv_uto)) {
+		/*
+		 * This connection is using UTO (either sending or has
+		 * received a value). We need to stop sending keepalives
+		 * (RFC 5482 4.2).
+		 * Returning without resetting the timer.
+		 */
+		INP_WUNLOCK(inp);
+		INP_INFO_WUNLOCK(&V_tcbinfo);
+		CURVNET_RESTORE();
+		return;
+	}
 	/*
 	 * Keep-alive timer went off; send something
 	 * or drop connection if idle for too long.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106262043.p5QKhsjU042945>