From 40f8dce6190f54036144ac4ee805b775e24c7ef9 Mon Sep 17 00:00:00 2001 From: John Kohl Date: Mon, 29 Oct 1990 14:01:55 +0000 Subject: [PATCH] don't check return address, as it can fail on certain implementations git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1358 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/sendto_kdc.c | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/src/lib/krb5/os/sendto_kdc.c b/src/lib/krb5/os/sendto_kdc.c index f74b2cac5..bdb756407 100644 --- a/src/lib/krb5/os/sendto_kdc.c +++ b/src/lib/krb5/os/sendto_kdc.c @@ -135,21 +135,24 @@ OLDDECLARG(krb5_data *, reply) 0, &fromaddr, &fromlen)) == -1) - continue; /* XXX */ - if (bcmp((char *)&fromaddr, (char *)&addr[host], - fromlen)) { - /* not from this one, perhaps from an earlier - request? */ - for (i = host-1; i >= 0; i--) { - if (!bcmp((char *)&fromaddr, (char *)&addr[host], - fromlen)) - break; - } - if (i < 0) /* not from someone we asked */ - continue; /* XXX */ - } - /* reply came from where we sent a request, - so clean up and return. */ + /* man page says error could be: + EBADF: won't happen + ENOTSOCK: it's a socket. + EWOULDBLOCK: not marked non-blocking, and we selected. + EINTR: could happen + EFAULT: we allocated the reply packet. + + so we continue on an EINTR. + */ + continue; + + /* We might consider here verifying that the reply + came from one of the KDC's listed for that address type, + but that check can be fouled by some implementations of + some network types which might show a loopback return + address, for example, if the KDC is on the same host + as the client. */ + reply->length = cc; retval = 0; goto out; -- 2.26.2