Skip to content

Commit

Permalink
Apply TCP timeouts to HTTPS (KKDCP) transport
Browse files Browse the repository at this point in the history
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 aace82e)

ticket: 8580
version_fixed: 1.15.2
  • Loading branch information
greghudson committed Jul 17, 2017
1 parent 86512c5 commit 79669b0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lib/krb5/os/sendto_kdc.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 79669b0

Please sign in to comment.