#include "arpping.h"
#include "common.h"
+#include "static_leases.h"
+
uint8_t blank_chaddr[] = {[0 ... 15] = 0};
/* ie, 192.168.55.255 */
if ((addr & 0xFF) == 0xFF) continue;
+ /* Only do if it isn't an assigned as a static lease */
+ if(!reservedIp(server_config.static_leases, htonl(addr)))
+ {
+
/* lease is not taken */
ret = htonl(addr);
if ((!(lease = find_lease_by_yiaddr(ret)) ||
(check_expired && lease_expired(lease))) &&
/* and it isn't on the network */
- !check_ip(ret)) {
+ !check_ip(ret)) {
return ret;
break;
}
}
+ }
return 0;
}