summaryrefslogtreecommitdiff
path: root/common/socket.c
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>2000-09-11 17:39:14 +0000
committerTed Lemon <source@isc.org>2000-09-11 17:39:14 +0000
commit950c6a0699d8f46e98b25cbf30817aa0821134c4 (patch)
treee5289f66add4ec65c9bb0c6bcc59a88ee98f53b7 /common/socket.c
parent359b023e7ee0159832b0ab8647d800a4eb81aba6 (diff)
downloadisc-dhcp-950c6a0699d8f46e98b25cbf30817aa0821134c4.tar.gz
Fix fallback interface setup code.
Diffstat (limited to 'common/socket.c')
-rw-r--r--common/socket.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/common/socket.c b/common/socket.c
index 216bf2c7..d15f3be1 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
}