freebsd-nq/lib
Bill Paul b1d8279802 Hm... wonder how long this has been here.
The logic in get_myaddress() is broken: it always returns the loopback
address due to the following rule:

                if ((ifreq.ifr_flags & IFF_UP) &&
                    ifr->ifr_addr.sa_family == AF_INET &&
                    (loopback == 1 && (ifreq.ifr_flags & IFF_LOOPBACK))) {

The idea is that we want to select the interface address only if it's
up and it's in the AF_INET family. If it turns uout we don't have
such an interface available, we make a second pass through the loop,
this time settling for the loopback interface. But the logic inadvertently
locks out all cases when loopback == 0, so nothing is ever selected until
the second pass (when loopback == 1).

This is changed to:

                if (((ifreq.ifr_flags & IFF_UP) &&
                    ifr->ifr_addr.sa_family == AF_INET) ||
                    (loopback == 1 && (ifreq.ifr_flags & IFF_LOOPBACK))) {

which I think does the right thing.

This is yet another bogon I discovered during NIS+ testing; I need
get_myaddress() to work correctly so that the callback code in the
client library will work.
1997-06-20 17:54:11 +00:00
..
compat
csu/i386
libalias
libc Hm... wonder how long this has been here. 1997-06-20 17:54:11 +00:00
libc_r Bring back nanosleep from the cold. 1997-06-04 13:03:12 +00:00
libcom_err
libcompat
libcrypt
libcurses
libdisk
libedit
libf2c
libF77
libftpio
libgnumalloc
libI77
libipx
libkse Bring back nanosleep from the cold. 1997-06-04 13:03:12 +00:00
libkvm
libm
libmd
libmytinfo
libncurses
libopie
libpam/modules Fix the man page's title (.Dt). 1997-06-02 17:24:36 +00:00
libpcap Bump minor version number. 1997-05-27 00:08:01 +00:00
libpthread Bring back nanosleep from the cold. 1997-06-04 13:03:12 +00:00
libresolv
librpcsvc Fix conflicts (this one is easy: there's just the Makefile). 1997-05-28 04:53:07 +00:00
libscsi
libskey
libss
libtcl
libtelnet
libtermcap
libutil Fix infinite loop. 1997-06-16 23:38:01 +00:00
libxpg4
liby
libz
msun
ncurses/ncurses
Makefile Hook in alias library. 1997-05-23 04:46:49 +00:00
Makefile.inc