PERFORCE change 195386 for review
Catalin Nicutar
cnicutar at FreeBSD.org
Sun Jun 26 20:43:54 UTC 2011
http://p4web.freebsd.org/@@195386?ac=10
Change 195386 by cnicutar at 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.
More information about the p4-projects
mailing list