svn rev #25120: trunk/src/lib/krb5/os/
ghudson@MIT.EDU
ghudson at MIT.EDU
Wed Aug 31 23:36:29 EDT 2011
http://src.mit.edu/fisheye/changelog/krb5/?cs=25120
Commit By: ghudson
Log Message:
ticket: 6951
Fix connection termination bug in sendto_kdc.
When terminating a connection, close and invalidate conn->fd so that
we don't look for it in selstate on the next select or poll
invocation. Looking for such an fd is harmless when using select, but
results in an assertion failure when using poll.
Changed Files:
U trunk/src/lib/krb5/os/sendto_kdc.c
Modified: trunk/src/lib/krb5/os/sendto_kdc.c
===================================================================
--- trunk/src/lib/krb5/os/sendto_kdc.c 2011-08-30 21:30:11 UTC (rev 25119)
+++ trunk/src/lib/krb5/os/sendto_kdc.c 2011-09-01 03:36:29 UTC (rev 25120)
@@ -913,12 +913,12 @@
static void
kill_conn(struct conn_state *conn, struct select_state *selstate, int err)
{
+ dprint("abandoning connection %d: %m\n", conn->fd, err);
+ cm_remove_fd(selstate, conn->fd);
+ closesocket(conn->fd);
+ conn->fd = INVALID_SOCKET;
conn->state = FAILED;
conn->err = err;
- shutdown(conn->fd, SHUTDOWN_BOTH);
- cm_remove_fd(selstate, conn->fd);
- dprint("abandoning connection %d: %m\n", conn->fd, err);
- /* Fix up max fd for next select call. */
}
/* Check socket for error. */
More information about the cvs-krb5
mailing list