Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IA_NA does not renew if RA not available and --ia_na was previously successfull #438

Open
ColinMcInnes opened this issue Jan 21, 2025 · 0 comments

Comments

@ColinMcInnes
Copy link
Contributor

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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant