Undefine The Failover Protocol and DHCP Daemon can not Build successfully
Lin Shu-ping
r92018 at im.ntu.edu.tw
Tue May 2 02:14:27 UTC 2006
Hi All,
I have undefine the failover protocol in site.h and the DHCP daemon can
not built successfully with some error messages.
Here is what I have done. I use version of dhcp-3.0.3.
In includes/site.h:
// Undefine the failover protocol.
// #define FAILOVER_PROTOCOL
And here are the error messages:
make[2]: Entering directory `/opt/dhcp-3.0.3/work.linux-2.2/server'
586-gcc -g -I/opt/dhcp-3.0.3 -I/opt/dhcp-3.0.3/includes -DLINUX_MAJOR=2 -
DLINUX_MINOR=4 -c -o dhcpd.o dhcpd.c
dhcpd.c: In function `dhcp_io_shutdown_countdown':
dhcpd.c:1194: `failover_connection_count' undeclared (first use in this
function)
dhcpd.c:1194: (Each undeclared identifier is reported only once
dhcpd.c:1194: for each function it appears in.)
make[2]: *** [dhcpd.o] Error 1
make[2]: Leaving directory `/opt/dhcp-3.0.3/work.linux-2.2/server'
make[1]: *** [install] Error 1
make[1]: Leaving directory `/opt/dhcp-3.0.3/work.linux-2.2'
make: *** [install] Error 2
After I check the function dhcp_io_shutdown_countdown() I found that it
seems a minor bug in this function. In dhcp_io_shutdown_countdown() it
declares a variable which is used in failover protocol:
#if defined (FAILOVER_PROTOCOL)
int failover_connection_count = 0;
#endif
However, at the end of this function there is a IF statement uses this
variable without #if defined (FAILOVER_PROTOCOL) block:
if (shutdown_state == shutdown_dhcp &&
!failover_connection_count) {
shutdown_state = shutdown_done;
shutdown_time = cur_time;
goto oncemore;
}
The failover_connection_count checking should be include in
FIALOVER_PROTOCOL define, but I do not know if there is any side-effect
doing this.
Does anyone have suggestions or ideas?
Regards,
Harry
More information about the dhcp-hackers
mailing list