summaryrefslogtreecommitdiff
path: root/sbin/dhclient/dispatch.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-03-02 12:19:15 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-03-02 12:19:15 +0000
commit8e8e738131702081c68df4d346e8b559125e0e25 (patch)
treee3e9825762036d6692df6d53ca3e6bb1d59a545e /sbin/dhclient/dispatch.c
parent263837a88150914220c68548cd10179879b35fcb (diff)
do not record all these interfaces we don't care about
Diffstat (limited to 'sbin/dhclient/dispatch.c')
-rw-r--r--sbin/dhclient/dispatch.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/sbin/dhclient/dispatch.c b/sbin/dhclient/dispatch.c
index b115d29d34b..7a183811ea4 100644
--- a/sbin/dhclient/dispatch.c
+++ b/sbin/dhclient/dispatch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dispatch.c,v 1.15 2004/02/24 17:26:43 henning Exp $ */
+/* $OpenBSD: dispatch.c,v 1.16 2004/03/02 12:19:14 henning Exp $ */
/* Network input dispatcher... */
@@ -93,17 +93,8 @@ discover_interfaces(void)
if (!strcmp(tmp->name, ifa->ifa_name))
break;
- if (!tmp) {
- tmp = dmalloc(sizeof(*tmp), "discover_interfaces");
- if (!tmp)
- error("Insufficient memory to %s %s",
- "record interface", ifa->ifa_name);
- strlcpy(tmp->name, ifa->ifa_name, sizeof(tmp->name));
- tmp->next = interfaces;
- tmp->flags = 0;
- tmp->noifmedia = tmp->dead = tmp->errors = 0;
- interfaces = tmp;
- }
+ if (!tmp)
+ break;
/*
* If we have the capability, extract link information