mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Fix RA problems with two interfaces on same IPv6 subnet.
This commit is contained in:
22
src/radv.c
22
src/radv.c
@@ -891,11 +891,21 @@ static int iface_search(struct in6_addr *local, int prefix,
|
||||
{
|
||||
struct search_param *param = vparam;
|
||||
struct dhcp_context *context;
|
||||
|
||||
struct iname *tmp;
|
||||
|
||||
(void)scope;
|
||||
(void)preferred;
|
||||
(void)valid;
|
||||
|
||||
|
||||
/* ignore interfaces we're not doing DHCP on. */
|
||||
if (!indextoname(daemon->icmp6fd, if_index, param->name) ||
|
||||
!iface_check(AF_LOCAL, NULL, param->name, NULL))
|
||||
return 1;
|
||||
|
||||
for (tmp = daemon->dhcp_except; tmp; tmp = tmp->next)
|
||||
if (tmp->name && wildcard_match(tmp->name, param->name))
|
||||
return 1;
|
||||
|
||||
for (context = daemon->dhcp6; context; context = context->next)
|
||||
if (!(context->flags & (CONTEXT_TEMPLATE | CONTEXT_OLD)) &&
|
||||
prefix <= context->prefix &&
|
||||
@@ -907,17 +917,9 @@ static int iface_search(struct in6_addr *local, int prefix,
|
||||
/* found an interface that's overdue for RA determine new
|
||||
timeout value and arrange for RA to be sent unless interface is
|
||||
still doing DAD.*/
|
||||
|
||||
if (!(flags & IFACE_TENTATIVE))
|
||||
param->iface = if_index;
|
||||
|
||||
/* should never fail */
|
||||
if (!indextoname(daemon->icmp6fd, if_index, param->name))
|
||||
{
|
||||
param->iface = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
new_timeout(context, param->name, param->now);
|
||||
|
||||
/* zero timers for other contexts on the same subnet, so they don't timeout
|
||||
|
||||
Reference in New Issue
Block a user