Implement dhcp-ignore-names and DNSMASQ_RELAY_ADDRESS for IPv6

Build DHCPv6 by default.
This commit is contained in:
Simon Kelley
2012-02-14 20:55:25 +00:00
parent 1adadf585d
commit 0793380b40
7 changed files with 58 additions and 8 deletions

View File

@@ -292,8 +292,12 @@ int address6_allocate(struct dhcp_context *context, unsigned char *clid, int cl
else if (!match_netid(c->filter, netids, pass))
continue;
else
{
start = addr6part(&c->start6) + ((j + c->addr_epoch + serial) % (1 + addr6part(&c->end6) - addr6part(&c->start6)));
{
if (option_bool(OPT_CONSEC_ADDR))
/* seed is largest extant lease addr in this context */
start = lease_find_max_addr6(c) + serial;
else
start = addr6part(&c->start6) + ((j + c->addr_epoch + serial) % (1 + addr6part(&c->end6) - addr6part(&c->start6)));
/* iterate until we find a free address. */
addr = start;