From: Ken Raeburn Date: Fri, 25 Feb 2000 20:51:59 +0000 (+0000) Subject: Fix off-by-one error in previous code, spotted at the last minute. X-Git-Tag: krb5-1.2-beta1~52 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=316465cf284923645bbdf2a541e7199d7f3674db;p=krb5.git Fix off-by-one error in previous code, spotted at the last minute. This is why things weren't working without the loopback addresses, which showed up last in the list, after the address my client was trying to use, thus hiding the error. (I tried to abort the previous checkin, but cvs went ahead with it despite the "editor session failed" report...hm.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12071 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kdc/network.c b/src/kdc/network.c index 05ca79aa9..b725b2798 100644 --- a/src/kdc/network.c +++ b/src/kdc/network.c @@ -187,12 +187,10 @@ foreach_localaddr (data, pass1fn, betweenfn, pass2fn) continue; } -#if 0 /* Access from same host doesn't work if loopback is omitted? */ #ifdef IFF_LOOPBACK /* None of the current callers want loopback addresses. */ if (ifreq.ifr_flags & IFF_LOOPBACK) goto skip; -#endif #endif /* Ignore interfaces that are down. */ if (!(ifreq.ifr_flags & IFF_UP)) @@ -391,7 +389,7 @@ const char *prog; signal_requests_hup = 0; } readfds = select_fds; - nfound = select(select_nfds, &readfds, 0, 0, 0); + nfound = select(select_nfds + 1, &readfds, 0, 0, 0); if (nfound == -1) { if (errno == EINTR) continue;