don't fail completely in if_addr() just because one interface won't SIOCGIFADDR.
authorkstailey <kstailey@openbsd.org>
Thu, 13 Feb 1997 23:33:37 +0000 (23:33 +0000)
committerkstailey <kstailey@openbsd.org>
Thu, 13 Feb 1997 23:33:37 +0000 (23:33 +0000)
sbin/ipnat/ipnat.c

index f1911c5..18b1f2c 100644 (file)
@@ -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)) {