svn rev #25661: trunk/src/kdc/

ghudson@MIT.EDU ghudson at MIT.EDU
Thu Jan 26 17:05:25 EST 2012


http://src.mit.edu/fisheye/changelog/krb5/?cs=25661
Commit By: ghudson
Log Message:
Clean up dispatch lookaside code slightly

Always log when we get a lookaside cache hit, eliminating a confusing
conditional.  This is a slight behavior change because we never used
to log a lookaside cache hit when we can't deliver the response via
UDP, but that was never really deliberate or important--we log all
sorts of stuff about responses which might turn out to be too big.

Also eliminate a signed/unsigned comparison warning in
finish_dispatch.


Changed Files:
U   trunk/src/kdc/dispatch.c
Modified: trunk/src/kdc/dispatch.c
===================================================================
--- trunk/src/kdc/dispatch.c	2012-01-26 21:56:16 UTC (rev 25660)
+++ trunk/src/kdc/dispatch.c	2012-01-26 22:05:25 UTC (rev 25661)
@@ -51,7 +51,7 @@
     void *oldarg = state->arg;
 
     if (state->is_tcp == 0 && response &&
-        response->length > max_dgram_reply_size) {
+        response->length > (unsigned int)max_dgram_reply_size) {
         krb5_free_data(kdc_context, response);
         response = NULL;
         code = make_too_big_error(&response);
@@ -114,22 +114,19 @@
         const char *name = 0;
         char buf[46];
 
-        if (!response || is_tcp != 0 ||
-            response->length <= max_dgram_reply_size) {
-            name = inet_ntop (ADDRTYPE2FAMILY (from->address->addrtype),
-                              from->address->contents, buf, sizeof (buf));
-            if (name == 0)
-                name = "[unknown address type]";
-            if (response)
-                krb5_klog_syslog(LOG_INFO,
-                                 "DISPATCH: repeated (retransmitted?) request "
-                                 "from %s, resending previous response", name);
-            else
-                krb5_klog_syslog(LOG_INFO,
-                                 "DISPATCH: repeated (retransmitted?) request "
-                                 "from %s during request processing, dropping "
-                                 "repeated request", name);
-        }
+        name = inet_ntop (ADDRTYPE2FAMILY (from->address->addrtype),
+                          from->address->contents, buf, sizeof (buf));
+        if (name == 0)
+            name = "[unknown address type]";
+        if (response)
+            krb5_klog_syslog(LOG_INFO,
+                             "DISPATCH: repeated (retransmitted?) request "
+                             "from %s, resending previous response", name);
+        else
+            krb5_klog_syslog(LOG_INFO,
+                             "DISPATCH: repeated (retransmitted?) request "
+                             "from %s during request processing, dropping "
+                             "repeated request", name);
 
         finish_dispatch(state, response ? 0 : KRB5KDC_ERR_DISCARD, response);
         return;



More information about the cvs-krb5 mailing list