]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Skip dummy interfaces on Linux; lose vestigial and erroneous USE_FALLBACK code; timeo...
authorTed Lemon <source@isc.org>
Sat, 29 Mar 1997 00:02:45 +0000 (00:02 +0000)
committerTed Lemon <source@isc.org>
Sat, 29 Mar 1997 00:02:45 +0000 (00:02 +0000)
common/dispatch.c

index f0adbee4312627672c29b67d6a33267449afd6c9..e327b8ffe72e4a2ab50edabe3fed8990e36eccb4 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: dispatch.c,v 1.37 1997/03/06 07:06:08 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: dispatch.c,v 1.38 1997/03/29 00:02:45 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -123,6 +123,11 @@ void discover_interfaces (state)
                }
 #endif
 
+#ifdef SKIP_DUMMY_INTERFACES
+               if (!strncmp (ifr.ifr_name, "dummy", 5))
+                       continue;
+#endif
+
 
                /* See if this is the sort of interface we want to
                   deal with. */
@@ -395,9 +400,6 @@ void dispatch ()
        for (l = protocols; l; l = l -> next) {
                ++nfds;
        }
-#ifdef USE_FALLBACK
-       ++nfds;
-#endif
        fds = (struct pollfd *)malloc ((nfds) * sizeof (struct pollfd));
        if (!fds)
                error ("Can't allocate poll structures.");
@@ -412,7 +414,7 @@ void dispatch ()
                        if (timeouts -> when <= cur_time) {
                                t = timeouts;
                                timeouts = timeouts -> next;
-                               (*(t -> func)) (t -> interface);
+                               (*(t -> func)) (t -> what);
                                t -> next = free_timeouts;
                                free_timeouts = t;
                                goto another;