mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-20 02:38:32 +00:00
Ignore template contexts where appropriate.
This commit is contained in:
@@ -214,7 +214,8 @@ static int complete_context6(struct in6_addr *local, int prefix,
|
||||
|
||||
for (context = daemon->dhcp6; context; context = context->next)
|
||||
{
|
||||
if (prefix == context->prefix &&
|
||||
if (!(context->flags & CONTEXT_TEMPLATE) &&
|
||||
prefix == context->prefix &&
|
||||
is_same_net6(local, &context->start6, prefix) &&
|
||||
is_same_net6(local, &context->end6, prefix))
|
||||
{
|
||||
|
||||
12
src/radv.c
12
src/radv.c
@@ -102,6 +102,7 @@ void ra_start_unsolicted(time_t now, struct dhcp_context *context)
|
||||
context->ra_time = now;
|
||||
else
|
||||
for (context = daemon->dhcp6; context; context = context->next)
|
||||
if (!(context->flags & CONTEXT_TEMPLATE))
|
||||
context->ra_time = now + (rand16()/13000); /* range 0 - 5 */
|
||||
|
||||
/* re-do frequently for a minute or so, in case the first gets lost. */
|
||||
@@ -350,7 +351,8 @@ static int add_prefixes(struct in6_addr *local, int prefix,
|
||||
struct dhcp_context *context;
|
||||
|
||||
for (context = daemon->dhcp6; context; context = context->next)
|
||||
if (prefix == context->prefix &&
|
||||
if (!(context->flags & CONTEXT_TEMPLATE) &&
|
||||
prefix == context->prefix &&
|
||||
is_same_net6(local, &context->start6, prefix) &&
|
||||
is_same_net6(local, &context->end6, prefix))
|
||||
{
|
||||
@@ -536,10 +538,12 @@ static int iface_search(struct in6_addr *local, int prefix,
|
||||
(void)valid;
|
||||
|
||||
for (context = daemon->dhcp6; context; context = context->next)
|
||||
if (prefix == context->prefix &&
|
||||
if (!(context->flags & CONTEXT_TEMPLATE) &&
|
||||
prefix == context->prefix &&
|
||||
is_same_net6(local, &context->start6, prefix) &&
|
||||
is_same_net6(local, &context->end6, prefix))
|
||||
if (context->ra_time != 0 && difftime(context->ra_time, param->now) <= 0.0)
|
||||
is_same_net6(local, &context->end6, prefix) &&
|
||||
context->ra_time != 0 &&
|
||||
difftime(context->ra_time, param->now) <= 0.0)
|
||||
{
|
||||
/* found an interface that's overdue for RA determine new
|
||||
timeout value and arrange for RA to be sent unless interface is
|
||||
|
||||
Reference in New Issue
Block a user