From 517cf6ecdea99347cba8a8029dae51cd7d351da2 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Thu, 27 Jan 2000 22:14:45 +0000 Subject: [PATCH] * dispatch.c (dispatch): Log address and port number of detected retransmits git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11977 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kdc/ChangeLog | 3 +++ src/kdc/dispatch.c | 21 ++++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/kdc/ChangeLog b/src/kdc/ChangeLog index 927b71f8a..7ec1f457f 100644 --- a/src/kdc/ChangeLog +++ b/src/kdc/ChangeLog @@ -1,5 +1,8 @@ 2000-01-27 Ken Raeburn + * dispatch.c (dispatch): Log address and port number of detected + retransmits. + * kdc_util.c (select_session_keytype): Revert 1999-09-01 changes; now always use any requested type indicated as supported by the db entry. diff --git a/src/kdc/dispatch.c b/src/kdc/dispatch.c index 0c30c6a33..230b7df2f 100644 --- a/src/kdc/dispatch.c +++ b/src/kdc/dispatch.c @@ -49,7 +49,26 @@ dispatch(pkt, from, portnum, response) /* try the replay lookaside buffer */ if (kdc_check_lookaside(pkt, from, response)) { /* a hit! */ - krb5_klog_syslog(LOG_INFO, "DISPATCH: repeated (retransmitted?) request, resending response"); + char *name = 0; + char buf[46]; + krb5_address *a = from->address; + +#ifdef HAVE_INET_NTOP + name = inet_ntop (from->address->addrtype, from->address->contents, + buf, sizeof (buf)); +#else + if (addrtype == ADDRTYPE_INET) { + struct sockaddr_in *sin + = (struct sockaddr_in *)from->address->contents; + strcpy (buf, inet_ntoa (sin->sin_addr)); + name = buf; + } +#endif + if (name == 0) + name = "[unknown address type]"; + krb5_klog_syslog(LOG_INFO, + "DISPATCH: repeated (retransmitted?) request from %s port %d, resending previous response", + name, portnum); return 0; } #endif -- 2.26.2