summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>1996-09-02 21:15:17 +0000
committerTed Lemon <source@isc.org>1996-09-02 21:15:17 +0000
commitedba1c3639e2091524ef3a8b46928f475ccacee5 (patch)
tree832992f0c557a589f679271489a473ba6b7c1708
parentc255efc9d0b311b6a0f31541a1f27f61f482ef1c (diff)
downloadisc-dhcp-edba1c3639e2091524ef3a8b46928f475ccacee5.tar.gz
Don't attach to unconfigured interfaces
-rw-r--r--common/dispatch.c8
-rw-r--r--dispatch.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/common/dispatch.c b/common/dispatch.c
index 92546947..f2803c33 100644
--- a/common/dispatch.c
+++ b/common/dispatch.c
@@ -42,7 +42,7 @@
#ifndef lint
static char copyright[] =
-"$Id: dispatch.c,v 1.21 1996/08/30 23:41:07 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dispatch.c,v 1.22 1996/09/02 21:15:17 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -120,12 +120,12 @@ void discover_interfaces ()
error ("Can't get interface flags for %s: %m",
ifr.ifr_name);
- /* Skip loopback and point-to-point interfaces. */
+ /* Skip loopback, point-to-point and down interfaces. */
if ((ifr.ifr_flags & IFF_LOOPBACK) ||
- (ifr.ifr_flags & IFF_POINTOPOINT))
+ (ifr.ifr_flags & IFF_POINTOPOINT) ||
+ !(ifr.ifr_flags & IFF_UP))
continue;
-
/* See if we've seen an interface that matches this one. */
for (tmp = interfaces; tmp; tmp = tmp -> next)
if (!strcmp (tmp -> name, ifp -> ifr_name))
diff --git a/dispatch.c b/dispatch.c
index 92546947..f2803c33 100644
--- a/dispatch.c
+++ b/dispatch.c
@@ -42,7 +42,7 @@
#ifndef lint
static char copyright[] =
-"$Id: dispatch.c,v 1.21 1996/08/30 23:41:07 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dispatch.c,v 1.22 1996/09/02 21:15:17 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -120,12 +120,12 @@ void discover_interfaces ()
error ("Can't get interface flags for %s: %m",
ifr.ifr_name);
- /* Skip loopback and point-to-point interfaces. */
+ /* Skip loopback, point-to-point and down interfaces. */
if ((ifr.ifr_flags & IFF_LOOPBACK) ||
- (ifr.ifr_flags & IFF_POINTOPOINT))
+ (ifr.ifr_flags & IFF_POINTOPOINT) ||
+ !(ifr.ifr_flags & IFF_UP))
continue;
-
/* See if we've seen an interface that matches this one. */
for (tmp = interfaces; tmp; tmp = tmp -> next)
if (!strcmp (tmp -> name, ifp -> ifr_name))