mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-20 02:38:32 +00:00
More IPv6 address allocation fixes.
This commit is contained in:
@@ -211,7 +211,8 @@ static int complete_context6(struct in6_addr *local, int prefix,
|
|||||||
|
|
||||||
for (context = daemon->dhcp6; context; context = context->next)
|
for (context = daemon->dhcp6; context; context = context->next)
|
||||||
{
|
{
|
||||||
if (!(context->flags & CONTEXT_TEMPLATE) &&
|
if ((context->flags & CONTEXT_DHCP) &&
|
||||||
|
!(context->flags & CONTEXT_TEMPLATE) &&
|
||||||
prefix == context->prefix &&
|
prefix == context->prefix &&
|
||||||
is_same_net6(local, &context->start6, prefix) &&
|
is_same_net6(local, &context->start6, prefix) &&
|
||||||
is_same_net6(local, &context->end6, prefix))
|
is_same_net6(local, &context->end6, prefix))
|
||||||
@@ -361,8 +362,7 @@ struct dhcp_context *address6_valid(struct dhcp_context *context,
|
|||||||
struct dhcp_context *tmp;
|
struct dhcp_context *tmp;
|
||||||
|
|
||||||
for (tmp = context; tmp; tmp = tmp->current)
|
for (tmp = context; tmp; tmp = tmp->current)
|
||||||
if ((tmp->flags & CONTEXT_STATIC) &&
|
if (is_same_net6(&tmp->start6, taddr, tmp->prefix) &&
|
||||||
is_same_net6(&tmp->start6, taddr, tmp->prefix) &&
|
|
||||||
match_netid(tmp->filter, netids, 1))
|
match_netid(tmp->filter, netids, 1))
|
||||||
return tmp;
|
return tmp;
|
||||||
|
|
||||||
|
|||||||
@@ -83,10 +83,12 @@ static int dhcp6_maybe_relay(struct in6_addr *link_address, struct dhcp_netid **
|
|||||||
struct dhcp_context *c;
|
struct dhcp_context *c;
|
||||||
context = NULL;
|
context = NULL;
|
||||||
|
|
||||||
for (c = daemon->dhcp6; c; c = c->next)
|
|
||||||
if (!IN6_IS_ADDR_LOOPBACK(link_address) &&
|
if (!IN6_IS_ADDR_LOOPBACK(link_address) &&
|
||||||
!IN6_IS_ADDR_LINKLOCAL(link_address) &&
|
!IN6_IS_ADDR_LINKLOCAL(link_address) &&
|
||||||
!IN6_IS_ADDR_MULTICAST(link_address) &&
|
!IN6_IS_ADDR_MULTICAST(link_address))
|
||||||
|
for (c = daemon->dhcp6; c; c = c->next)
|
||||||
|
if ((c->flags & CONTEXT_DHCP) &&
|
||||||
|
!(c->flags & CONTEXT_TEMPLATE) &&
|
||||||
is_same_net6(link_address, &c->start6, c->prefix) &&
|
is_same_net6(link_address, &c->start6, c->prefix) &&
|
||||||
is_same_net6(link_address, &c->end6, c->prefix))
|
is_same_net6(link_address, &c->end6, c->prefix))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user