[26324] in CVS-changelog-for-Kerberos-V5
svn rev #25661: trunk/src/kdc/
daemon@ATHENA.MIT.EDU (ghudson@mit.edu)
Thu Jan 26 17:05:27 2012
Date: Thu, 26 Jan 2012 17:05:25 -0500
From: ghudson@mit.edu
Message-Id: <201201262205.q0QM5PBC010658@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu
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;
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5