IA_NA does not renew if RA not available and --ia_na was previously successfull
Split off from a previous issue.
Setup: dhcpcd 10.1.10 started in managed mode. ia_na is NOT in conf file Router not providing RA (so we expect IPv6 to just go into holding pattern, no SLAAC nor DHCPv6). System starts at epoch time.
if I use "--ia_na" after startup it will force a DHCPv6 Solicit even if RA is not available. DHCPv6 server responds, we get time server, TimeOfDay is set.
If I follow up with --rebind -6, lease file is expired, which triggers a rebind. The internal logic sees no RA, and that ia_na was not in conf file, so it goes back into holding pattern.
I would like to add a check that if dhcpcd saw "--ia_na" at some point and it succeeded (we made it all the way to BOUND6), then we should try a Solicit again after IPv6 Routers are declared "not found".
static bool
dhcp6_startdiscoinform(struct interface *ifp)
{
unsigned long long opts = ifp->options->options;
if (opts & DHCPCD_IA_FORCED || ipv6nd_hasradhcp(ifp, true))
dhcp6_startdiscover(ifp);
else if (opts & DHCPCD_INFORM6 || ipv6nd_hasradhcp(ifp, false))
dhcp6_startinform(ifp);
else
return false; <<<<< some extra check in here for "have previously seen successful use of --ia_na, triggers dhcp6_startdiscover(ifp);
return true;
}