From: Ted Lemon Date: Mon, 11 Sep 2000 17:39:14 +0000 (+0000) Subject: Fix fallback interface setup code. X-Git-Tag: V3-BETA-2-PATCH-4~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=950c6a0699d8f46e98b25cbf30817aa0821134c4;p=thirdparty%2Fdhcp.git Fix fallback interface setup code. --- diff --git a/common/socket.c b/common/socket.c index 216bf2c7d..d15f3be1d 100644 --- a/common/socket.c +++ b/common/socket.c @@ -51,7 +51,7 @@ #ifndef lint static char copyright[] = -"$Id: socket.c,v 1.52 2000/09/01 23:03:38 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; +"$Id: socket.c,v 1.53 2000/09/11 17:39:14 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -354,18 +354,16 @@ void maybe_setup_fallback () { #if defined (USE_SOCKET_FALLBACK) isc_result_t status; - struct interface_info *fbi; - fbi = setup_fallback (); - if (fbi) { + struct interface_info *fbi = (struct interface_info *)0; + if (setup_fallback (&fbi, MDL)) { fbi -> wfdesc = if_register_socket (fbi); - fbi -> refcnt = 1; - fbi -> type = dhcp_type_interface; status = omapi_register_io_object ((omapi_object_t *)fbi, if_readsocket, 0, fallback_discard, 0, 0); if (status != ISC_R_SUCCESS) log_fatal ("Can't register I/O handle for %s: %s", fbi -> name, isc_result_totext (status)); + interface_dereference (&fbi, MDL); } #endif }