From f809a5f8dde458ba54e139590e90e35419181501 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Thu, 9 Jan 1997 16:38:05 +0000 Subject: Correct logic braino when attempting to exclude loopback addresses on the first pass. Submitted by: Greg Lehey --- lib/libc/rpc/get_myaddress.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/libc/rpc/get_myaddress.c b/lib/libc/rpc/get_myaddress.c index 2adb6feeb467..2c215f909028 100644 --- a/lib/libc/rpc/get_myaddress.c +++ b/lib/libc/rpc/get_myaddress.c @@ -30,7 +30,7 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)get_myaddress.c 1.4 87/08/11 Copyr 1984 Sun Micro";*/ /*static char *sccsid = "from: @(#)get_myaddress.c 2.1 88/07/29 4.0 RPCSRC";*/ -static char *rcsid = "$Id: get_myaddress.c,v 1.6 1996/12/30 14:26:28 peter Exp $"; +static char *rcsid = "$Id: get_myaddress.c,v 1.7 1997/01/09 14:55:15 peter Exp $"; #endif /* @@ -88,7 +88,7 @@ again: } if ((ifreq.ifr_flags & IFF_UP) && ifr->ifr_addr.sa_family == AF_INET && - (loopback == 1 && (ifreq.ifr_flags & IFF_LOOPBACK))) { + (loopback == 1 || !(ifreq.ifr_flags & IFF_LOOPBACK))) { *addr = *((struct sockaddr_in *)&ifr->ifr_addr); addr->sin_port = htons(PMAPPORT); gotit = 1; -- cgit v1.2.3