Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/rpc.bootparamd net/if.h is necessary for IFF_LOOPBACK.



details:   https://anonhg.NetBSD.org/src/rev/f431ad5321a3
branches:  trunk
changeset: 485409:f431ad5321a3
user:      itojun <itojun%NetBSD.org@localhost>
date:      Thu Apr 27 09:48:59 2000 +0000

description:
net/if.h is necessary for IFF_LOOPBACK.
accept lo[0-9] or lo$ if we check if_name.

diffstat:

 usr.sbin/rpc.bootparamd/bootparamd.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (37 lines):

diff -r 48ea0f25717f -r f431ad5321a3 usr.sbin/rpc.bootparamd/bootparamd.c
--- a/usr.sbin/rpc.bootparamd/bootparamd.c      Thu Apr 27 09:43:38 2000 +0000
+++ b/usr.sbin/rpc.bootparamd/bootparamd.c      Thu Apr 27 09:48:59 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bootparamd.c,v 1.22 2000/04/14 12:14:40 itojun Exp $   */
+/*     $NetBSD: bootparamd.c,v 1.23 2000/04/27 09:48:59 itojun Exp $   */
 
 /*
  * This code is not copyright, and is placed in the public domain.
@@ -11,7 +11,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: bootparamd.c,v 1.22 2000/04/14 12:14:40 itojun Exp $");
+__RCSID("$NetBSD: bootparamd.c,v 1.23 2000/04/27 09:48:59 itojun Exp $");
 #endif
 
 #include <sys/types.h>
@@ -31,6 +31,8 @@
 #include <util.h>
 #include <ifaddrs.h>
 
+#include <net/if.h>
+
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
@@ -432,7 +434,8 @@
                if (ifa->ifa_flags & IFF_LOOPBACK)
                        continue;
 #else
-               if (strncmp(ifa->ifa_name, "lo", 2) == 0)
+               if (strncmp(ifa->ifa_name, "lo", 2) == 0 &&
+                   (isdigit(ifa->ifa_name[2]) || ifa->ifa_name[2] == '\0'))
                        continue;
 #endif
 



Home | Main Index | Thread Index | Old Index