From 9652af24d0609e420a3824aa0b4a84153af9fb48 Mon Sep 17 00:00:00 2001 From: Ted Lemon Date: Sat, 29 Mar 1997 00:02:45 +0000 Subject: [PATCH] Skip dummy interfaces on Linux; lose vestigial and erroneous USE_FALLBACK code; timeout -> what, not timeout -> interface --- common/dispatch.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/common/dispatch.c b/common/dispatch.c index f0adbee43..e327b8ffe 100644 --- a/common/dispatch.c +++ b/common/dispatch.c @@ -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; -- 2.47.3