]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Apply TCP timeouts to HTTPS (KKDCP) transport
authorGreg Hudson <ghudson@mit.edu>
Thu, 20 Apr 2017 19:33:10 +0000 (15:33 -0400)
committerGreg Hudson <ghudson@mit.edu>
Mon, 17 Jul 2017 22:09:29 +0000 (18:09 -0400)
We apply (as of ticket #7604) a ten-second minimum delay after a TCP
connection is accepted before creating new connections or sending UDP
packets.  Apply this timeout to HTTPS connections as well, by removing
the transport check in get_endtime().  As the endtime field is only
set by service_tcp_connect(), it will always have the value 0 for UDP
connection state objects, so there is no need to check the transport
type.

(cherry picked from commit aace82e17ed0185faa3e9cda5437a3c6a7a40b10)

ticket: 8580
version_fixed: 1.14.6

src/lib/krb5/os/sendto_kdc.c

index d11aa118a38825b99dfa4e75a8c4ecea08bf763b..83f9025747823cd647267f46ca27392ed896258b 100644 (file)
@@ -1313,8 +1313,7 @@ get_endtime(time_ms endtime, struct conn_state *conns)
     struct conn_state *state;
 
     for (state = conns; state != NULL; state = state->next) {
-        if (state->addr.transport == TCP &&
-            (state->state == READING || state->state == WRITING) &&
+        if ((state->state == READING || state->state == WRITING) &&
             state->endtime > endtime)
             endtime = state->endtime;
     }