aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2017-04-20 15:33:10 -0400
committerGreg Hudson <ghudson@mit.edu>2017-07-17 18:09:29 -0400
commit9a844b3f7206864d390cc35fc0cb4977684d7de2 (patch)
tree8f3b06ca1ee4a998a16393bb9816c02cfb9e71e2
parent2514453d616bafe47beacc73f695ae6d4701ae19 (diff)
downloadkrb5-9a844b3f7206864d390cc35fc0cb4977684d7de2.zip
krb5-9a844b3f7206864d390cc35fc0cb4977684d7de2.tar.gz
krb5-9a844b3f7206864d390cc35fc0cb4977684d7de2.tar.bz2
Apply TCP timeouts to HTTPS (KKDCP) transport
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
-rw-r--r--src/lib/krb5/os/sendto_kdc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/krb5/os/sendto_kdc.c b/src/lib/krb5/os/sendto_kdc.c
index d11aa11..83f9025 100644
--- a/src/lib/krb5/os/sendto_kdc.c
+++ b/src/lib/krb5/os/sendto_kdc.c
@@ -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;
}