mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Relax rules in prefix length in (IPv6) dhcp-range.
This commit is contained in:
committed by
Simon Kelley
parent
5f45d6a715
commit
4c82efc5ac
14
src/dhcp6.c
14
src/dhcp6.c
@@ -330,9 +330,9 @@ static int complete_context6(struct in6_addr *local, int prefix,
|
||||
{
|
||||
if ((context->flags & CONTEXT_DHCP) &&
|
||||
!(context->flags & (CONTEXT_TEMPLATE | CONTEXT_OLD)) &&
|
||||
prefix == context->prefix &&
|
||||
is_same_net6(local, &context->start6, prefix) &&
|
||||
is_same_net6(local, &context->end6, prefix))
|
||||
prefix <= context->prefix &&
|
||||
is_same_net6(local, &context->start6, context->prefix) &&
|
||||
is_same_net6(local, &context->end6, context->prefix))
|
||||
{
|
||||
|
||||
|
||||
@@ -631,9 +631,9 @@ static int construct_worker(struct in6_addr *local, int prefix,
|
||||
if (!(template->flags & CONTEXT_TEMPLATE))
|
||||
{
|
||||
/* non-template entries, just fill in interface and local addresses */
|
||||
if (prefix == template->prefix &&
|
||||
is_same_net6(local, &template->start6, prefix) &&
|
||||
is_same_net6(local, &template->end6, prefix))
|
||||
if (prefix <= template->prefix &&
|
||||
is_same_net6(local, &template->start6, template->prefix) &&
|
||||
is_same_net6(local, &template->end6, template->prefix))
|
||||
{
|
||||
template->if_index = if_index;
|
||||
template->local6 = *local;
|
||||
@@ -641,7 +641,7 @@ static int construct_worker(struct in6_addr *local, int prefix,
|
||||
|
||||
}
|
||||
else if (wildcard_match(template->template_interface, ifrn_name) &&
|
||||
template->prefix == prefix)
|
||||
template->prefix >= prefix)
|
||||
{
|
||||
start6 = *local;
|
||||
setaddr6part(&start6, addr6part(&template->start6));
|
||||
|
||||
Reference in New Issue
Block a user