I noticed that dnsmasq often wasn't sending any unsolicited RAs for me.
This turned out to happen when the interface (a bridge interface) wasn't created yet at the time dnsmasq started. When dnsmasq is started after the interface is created, it sends RAs as expected. I assume this also extends to other types of virtual interfaces that are created after dnsmasq starts. Digging into the source, it seems to be caused by a missing call to ra_start_unsolicited for non-template contexts in construct_worker from src/dhcp6.c. The attached patch adds that call, but only if the interface index or address changed to prevent doing fast RAs for no reason. I tested it on my own server and it appears to work as expected. When the interface is created and configured, dnsmasq does fast RAs for a while and then settles into slow RAs. Kind regards, -- Maarten
>From a8c3132085e31faf7d5e6326783f4d8e0e087b01 Mon Sep 17 00:00:00 2001 From: Maarten de Vries <maar...@de-vri.es> Date: Thu, 10 May 2018 20:49:16 +0200 Subject: [PATCH] Start unsolicited RAs for non-template contexts. --- src/dhcp6.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/dhcp6.c b/src/dhcp6.c index 0853664..9beb646 100644 --- a/src/dhcp6.c +++ b/src/dhcp6.c @@ -647,8 +647,11 @@ static int construct_worker(struct in6_addr *local, int prefix, is_same_net6(local, &template->start6, template->prefix) && is_same_net6(local, &template->end6, template->prefix)) { + if (template->if_index == if_index && IN6_ARE_ADDR_EQUAL(&template->local6, local)) + continue; template->if_index = if_index; template->local6 = *local; + ra_start_unsolicited(param->now, template); } } -- 2.17.0
_______________________________________________ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss