Fix off-by-one error in previous code, spotted at the last minute.
authorKen Raeburn <raeburn@mit.edu>
Fri, 25 Feb 2000 20:51:59 +0000 (20:51 +0000)
committerKen Raeburn <raeburn@mit.edu>
Fri, 25 Feb 2000 20:51:59 +0000 (20:51 +0000)
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

src/kdc/network.c

index 05ca79aa99846b6f76384d0d6772d855eb91e82f..b725b2798595279c0605bcfe1893ad6479d51f15 100644 (file)
@@ -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;