From: kstailey Date: Thu, 13 Feb 1997 23:33:37 +0000 (+0000) Subject: don't fail completely in if_addr() just because one interface won't SIOCGIFADDR. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=1ee3365032c16ed317d1be2abd00a3d2c713b4bc;p=openbsd don't fail completely in if_addr() just because one interface won't SIOCGIFADDR. --- diff --git a/sbin/ipnat/ipnat.c b/sbin/ipnat/ipnat.c index f1911c53c31..18b1f2c2800 100644 --- a/sbin/ipnat/ipnat.c +++ b/sbin/ipnat/ipnat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipnat.c,v 1.11 1997/02/13 01:19:05 kstailey Exp $ */ +/* $OpenBSD: ipnat.c,v 1.12 1997/02/13 23:33:37 kstailey Exp $ */ /* * (C)opyright 1993,1994,1995 by Darren Reed. * @@ -415,10 +415,8 @@ char *name; sizeof(ifr->ifr_name))) continue; ifreq = *ifr; - if (ioctl(s, SIOCGIFADDR, (caddr_t)ifr) < 0) { - warn("SIOCGIFADDR"); - goto if_addr_lose; - } + if (ioctl(s, SIOCGIFADDR, (caddr_t)ifr) < 0) + continue; if (ifr->ifr_addr.sa_family != AF_INET) continue; if (!strcmp(name, ifr->ifr_name)) {