diff options
author | Greg Hudson <ghudson@mit.edu> | 2017-04-20 15:33:10 -0400 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2017-04-21 16:57:03 -0400 |
commit | aace82e17ed0185faa3e9cda5437a3c6a7a40b10 (patch) | |
tree | 046cdf0c4ea49b7903e10b5da61eb8714a61afa6 | |
parent | 89ce6420832858950271858e7c6e1a2eefebc683 (diff) | |
download | krb5-aace82e17ed0185faa3e9cda5437a3c6a7a40b10.zip krb5-aace82e17ed0185faa3e9cda5437a3c6a7a40b10.tar.gz krb5-aace82e17ed0185faa3e9cda5437a3c6a7a40b10.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.
ticket: 8580
target_version: 1.15-next
target_version: 1.14-next
tags: pullup
-rw-r--r-- | src/lib/krb5/os/sendto_kdc.c | 3 |
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 8b46148..e8bc0ad 100644 --- a/src/lib/krb5/os/sendto_kdc.c +++ b/src/lib/krb5/os/sendto_kdc.c @@ -1372,8 +1372,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; } |