diff options
author | Ted Lemon <source@isc.org> | 2000-12-29 06:47:46 +0000 |
---|---|---|
committer | Ted Lemon <source@isc.org> | 2000-12-29 06:47:46 +0000 |
commit | 6cecb7c50dfef956935a10874825eb995a2de824 (patch) | |
tree | 7ba4587a11b61b387368affa4357c51a3d4d55d0 /relay | |
parent | 6e8d142358085d46cb21c465748a3417fd179ea3 (diff) | |
download | isc-dhcp-6cecb7c50dfef956935a10874825eb995a2de824.tar.gz |
Initialize omapi before trying to mess with interfaces.
Diffstat (limited to 'relay')
-rw-r--r-- | relay/dhcrelay.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c index dcb9d6e3..cf68bb57 100644 --- a/relay/dhcrelay.c +++ b/relay/dhcrelay.c @@ -43,7 +43,7 @@ #ifndef lint static char ocopyright[] = -"$Id: dhcrelay.c,v 1.47 2000/10/12 09:05:04 mellon Exp $ Copyright (c) 1997-2000 Internet Software Consortium. All rights reserved.\n"; +"$Id: dhcrelay.c,v 1.48 2000/12/29 06:47:46 mellon Exp $ Copyright (c) 1997-2000 Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -135,6 +135,15 @@ int main (argc, argv, envp) setlogmask (LOG_UPTO (LOG_INFO)); #endif + /* Set up the OMAPI. */ + status = omapi_init (); + if (status != ISC_R_SUCCESS) + log_fatal ("Can't initialize OMAPI: %s", + isc_result_totext (status)); + + /* Set up the OMAPI wrappers for the interface object. */ + interface_setup (); + for (i = 1; i < argc; i++) { if (!strcmp (argv [i], "-p")) { if (++i == argc) @@ -260,12 +269,6 @@ int main (argc, argv, envp) /* Get the current time... */ GET_TIME (&cur_time); - /* Set up the OMAPI. */ - status = omapi_init (); - if (status != ISC_R_SUCCESS) - log_fatal ("Can't initialize OMAPI: %s", - isc_result_totext (status)); - /* Discover all the network interfaces. */ discover_interfaces (DISCOVER_RELAY); |