diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 1998-03-20 02:58:20 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 1998-03-20 02:58:20 +0000 |
commit | e5754a8b88eab686c52ba83a1fdbdd5b879d8dd4 (patch) | |
tree | f9fa03a58e4d599adf136fcc52465b93b8661c3d | |
parent | e79efb71d38ed9a25cba805697fde6f368760034 (diff) |
Be "aware" of ifaliases.
-rw-r--r-- | usr.sbin/amd/amd/wire.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/amd/amd/wire.c b/usr.sbin/amd/amd/wire.c index cb246fb7d9c..57c4186e816 100644 --- a/usr.sbin/amd/amd/wire.c +++ b/usr.sbin/amd/amd/wire.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: @(#)wire.c 8.1 (Berkeley) 6/6/93 - * $Id: wire.c,v 1.2 1997/01/31 14:42:03 graichen Exp $ + * $Id: wire.c,v 1.3 1998/03/20 02:58:19 angelos Exp $ */ /* @@ -136,6 +136,7 @@ char *getwire() */ for (cp = buf; cp < cplim; cp += size(ifr)) { addrlist *al; + struct sockaddr_in sintmp; ifr = (struct ifreq *) cp; if (ifr->ifr_addr.sa_family != AF_INET) @@ -143,6 +144,8 @@ char *getwire() else address = ((struct sockaddr_in *) &ifr->ifr_addr)->sin_addr.s_addr; + sintmp.sin_addr.s_addr = address; + /* * Get interface flags */ @@ -161,6 +164,7 @@ char *getwire() /* * Get the netmask of this interface */ + memcpy(&ifr->ifr_addr, &sintmp, sizeof(sintmp)); if (ioctl(sk, SIOCGIFNETMASK, (caddr_t) ifr) < 0) continue; |