aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1997-01-09 16:38:05 +0000
committerPeter Wemm <peter@FreeBSD.org>1997-01-09 16:38:05 +0000
commitf809a5f8dde458ba54e139590e90e35419181501 (patch)
treeebfe16cd1a04bf6c209c7694fceeacb4f2505a25
parent45eccbb217426b249b55dc18b073f81c9a38000f (diff)
downloadsrc-f809a5f8dde458ba54e139590e90e35419181501.tar.gz
src-f809a5f8dde458ba54e139590e90e35419181501.zip
Correct logic braino when attempting to exclude loopback addresses on
the first pass. Submitted by: Greg Lehey <grog@lemis.de>
Notes
Notes: svn path=/head/; revision=21460
-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 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;