* dispatch.c (dispatch): Log address and port number of detected retransmits
authorKen Raeburn <raeburn@mit.edu>
Thu, 27 Jan 2000 22:14:45 +0000 (22:14 +0000)
committerKen Raeburn <raeburn@mit.edu>
Thu, 27 Jan 2000 22:14:45 +0000 (22:14 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11977 dc483132-0cff-0310-8789-dd5450dbe970

src/kdc/ChangeLog
src/kdc/dispatch.c

index 927b71f8a1ef7cc0806366d2eff60fa3accdccc6..7ec1f457f2bf740c5dea87c814ce7554af2b1a12 100644 (file)
@@ -1,5 +1,8 @@
 2000-01-27  Ken Raeburn  <raeburn@mit.edu>
 
+       * 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.
index 0c30c6a339799509860c02a3113ee5452d2efa58..230b7df2f052f2ee60f3cf450cc39037c04350e2 100644 (file)
@@ -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