summaryrefslogtreecommitdiffstats
path: root/lib/libc/rpc
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1997-01-09 16:38:05 +0000
committerpeter <peter@FreeBSD.org>1997-01-09 16:38:05 +0000
commit669906681bbf7fd490187030077c0c0d678ac669 (patch)
treeebfe16cd1a04bf6c209c7694fceeacb4f2505a25 /lib/libc/rpc
parent29cc1dc80c0dcf887320d3121029c75f79839c16 (diff)
downloadFreeBSD-src-669906681bbf7fd490187030077c0c0d678ac669.zip
FreeBSD-src-669906681bbf7fd490187030077c0c0d678ac669.tar.gz
Correct logic braino when attempting to exclude loopback addresses on
the first pass. Submitted by: Greg Lehey <grog@lemis.de>
Diffstat (limited to 'lib/libc/rpc')
-rw-r--r--lib/libc/rpc/get_myaddress.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/rpc/get_myaddress.c b/lib/libc/rpc/get_myaddress.c
index 2adb6fe..2c215f9 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;
OpenPOWER on IntegriCloud