mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-11-09 16:20:55 +00:00
Fix RA problems with two interfaces on same IPv6 subnet.
This commit is contained in:
3 files changed
+21
-12
No files matched your search
+12
-10
@@ -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