From 3d7b550f522863754a99e122d5b58a9be670107a Mon Sep 17 00:00:00 2001 From: Simon Kelley Date: Fri, 10 Feb 2012 17:35:37 +0000 Subject: [PATCH] missed DHCP6 conditional compilation. --- src/lease.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lease.c b/src/lease.c index 999c2fe..b5f9926 100644 --- a/src/lease.c +++ b/src/lease.c @@ -69,6 +69,7 @@ void lease_init(time_t now) if (leasestream) while (fscanf(leasestream, "%255s %255s", daemon->dhcp_buff3, daemon->dhcp_buff2) == 2) { +#ifdef HAVE_DHCP6 if (strcmp(daemon->dhcp_buff3, "duid") == 0) { daemon->duid_len = parse_hex(daemon->dhcp_buff2, (unsigned char *)daemon->dhcp_buff2, 130, NULL, NULL); @@ -76,7 +77,8 @@ void lease_init(time_t now) memcpy(daemon->duid, daemon->dhcp_buff2, daemon->duid_len); continue; } - +#endif + ei = atol(daemon->dhcp_buff3); if (fscanf(leasestream, " %64s %255s %764s", @@ -150,7 +152,6 @@ void lease_init(time_t now) /* If we're not doing DHCPv6, and there are not v6 leases, don't add the DUID to the database */ if (!daemon->duid && daemon->dhcp6) make_duid(now); - #endif #ifdef HAVE_SCRIPT