PERFORCE change 197422 for review
Catalin Nicutar
cnicutar at FreeBSD.org
Tue Aug 9 12:40:47 UTC 2011
http://p4web.freebsd.org/@@197422?ac=10
Change 197422 by cnicutar at cnicutar_cronos on 2011/08/09 12:40:43
Fix inheriting received UTO for accepting sockets.
Affected files ...
.. //depot/projects/soc2011/cnicutar_tcputo_9/src/sys/netinet/tcp_syncache.c#3 edit
Differences ...
==== //depot/projects/soc2011/cnicutar_tcputo_9/src/sys/netinet/tcp_syncache.c#3 (text+ko) ====
@@ -831,10 +831,10 @@
tp->t_flags |= TF_SND_UTO;
tp->snd_uto = sc->sc_snd_uto;
}
- if (sc->sc_flags & SCF_RCV_UTO) {
+ if (sc->sc_flags & SCF_RCV_UTO)
tp->t_flags |= TF_RCV_UTO;
- tp->rcv_uto = sc->sc_rcv_uto;
- }
+ /* Regardless of SCF_RCV_UTO. */
+ tp->rcv_uto = sc->sc_rcv_uto;
}
if (sc->sc_flags & SCF_ECN)
@@ -1086,11 +1086,10 @@
to->to_flags |= TOF_UTO;
}
- if (tp->t_flags & TF_RCV_UTO) {
- /* Remember received timeout to pass on. */
- rcv_uto_tf = 1;
- rcv_uto = tp->rcv_uto;
- }
+ /* Remember received UTO regardless of disposition and clear it. */
+ rcv_uto_tf = tp->t_flags & TF_RCV_UTO;
+ rcv_uto = tp->rcv_uto;
+ tp->rcv_uto = 0;
/* By the time we drop the lock these should no longer be used. */
so = NULL;
@@ -1305,11 +1304,10 @@
sc->sc_flags |= SCF_SND_UTO;
}
- /* Inherit received UTO. */
- if (rcv_uto_tf) {
- sc->sc_rcv_uto = rcv_uto;
+ /* Inherit received UTO, regardless of disposition. */
+ if (rcv_uto_tf)
sc->sc_flags |= SCF_RCV_UTO;
- }
+ sc->sc_rcv_uto = rcv_uto;
if (V_tcp_syncookies) {
syncookie_generate(sch, sc, &flowtmp);
More information about the p4-projects
mailing list