]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Fix fallback interface setup code.
authorTed Lemon <source@isc.org>
Mon, 11 Sep 2000 17:39:14 +0000 (17:39 +0000)
committerTed Lemon <source@isc.org>
Mon, 11 Sep 2000 17:39:14 +0000 (17:39 +0000)
common/socket.c

index 216bf2c7d37c21380d9fa272221f959e351235ba..d15f3be1d3a858b12733a0f288a781ee153ae56e 100644 (file)
@@ -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
 }