udhcp: new config option "Rewrite the lease file at every new acknowledge"

(Mats Erik Andersson <mats@blue2net.com> (Blue2Net AB))
udhcp: consistently treat server_config.start/end IPs as host-order
       fix IP parsing for 64bit machines
       fix unsafe hton macro usage in read_opt()
       do not chdir("/") when daemonizing
       fix help text
This commit is contained in:
Denis Vlasenko
2007-07-01 17:05:57 +00:00
parent dc7a5eae36
commit c82b5108e1
10 changed files with 153 additions and 117 deletions

View File

@@ -119,8 +119,8 @@ uint32_t find_address(int check_expired)
uint32_t addr, ret;
struct dhcpOfferedAddr *lease = NULL;
addr = ntohl(server_config.start); /* addr is in host order here */
for (;addr <= ntohl(server_config.end); addr++) {
addr = server_config.start_ip; /* addr is in host order here */
for (;addr <= server_config.end_ip; addr++) {
/* ie, 192.168.55.0 */
if (!(addr & 0xFF)) continue;