odhcp6c icon indicating copy to clipboard operation
odhcp6c copied to clipboard

Add error checking to handle renew failure

Open lukedd opened this issue 1 year ago • 9 comments

Check for error status code in the IA Prefix option in replies to RENEW messages.

This fixes a problem where odhcp6c thinks that renewal succeeded, when actually the upstream router is no longer routing this prefix for us.

See https://github.com/openwrt/odhcp6c/issues/61#issuecomment-2509536512

lukedd avatar Dec 01 '24 02:12 lukedd

@dedeckeh Can you have a look at it?

Headcrabed avatar Feb 09 '25 03:02 Headcrabed

@lukedd I confirm that your fix is working. Thank you!

sinancetinkaya avatar Feb 10 '25 21:02 sinancetinkaya

That your fix is working, ipv6 has been running without dropping for 1 month with the change you suggested.

jdmpower avatar Feb 24 '25 13:02 jdmpower

Does not work for me, ipv6 still stopps working sometimes, although less frequently.

borkra avatar Mar 16 '25 02:03 borkra

Hi @borkra , if you can share any logs, or ideally a tcpdump packet capture, I'd be glad to see if we can address your situation properly.

lukedd avatar Apr 13 '25 05:04 lukedd

Unfortunately, it is so random and rare. It’s hard to reproduce to capture logs. It takes days or weeks…

borkra avatar Apr 13 '25 09:04 borkra

Unfortunately, it is so random and rare. It’s hard to reproduce to capture logs. It takes days or weeks…

use an external log server like papertrail and add an event trigger for the error

sinancetinkaya avatar Apr 13 '25 15:04 sinancetinkaya

I will try, but this change makes things so much better I would commit it.

borkra avatar Apr 13 '25 16:04 borkra

well it happened again over night... It seems more like complete ipv6 routing failure, ipv6 addresses pingable from the router no ipv6 addresses work on the client but they do work on the router, even fdxxx local address not working SIGUSR2 does not fix anything restarting dnsmasq fixes fdxxx local address routing but not global global came back later with no indication of any event in the syslog

borkra avatar Apr 14 '25 13:04 borkra

To follow this PR, IPv6 is very important...

Neustradamus avatar Apr 22 '25 09:04 Neustradamus

@Neustradamus is there a merge timeline on this? OpenWRT is consistently a poor experience on my home Wi-Fi needing to reboot IPv6 everyday.

Diatrus avatar Jun 29 '25 03:06 Diatrus

@Diatrus: I do not manage the OpenWrt project, for this repo, it is @dedeckeh...

Hope it will be solved soon...

Neustradamus avatar Jun 29 '25 10:06 Neustradamus

@Noltari, @systemcrash: Have you seen this PR?

Neustradamus avatar Oct 17 '25 22:10 Neustradamus

@Noltari, @systemcrash: Have you seen this PR?

@Neustradamus please stop pinging people for no reason. Of course I've seen this and many other PRs, but I simply lack the time to review them all.

Noltari avatar Oct 18 '25 08:10 Noltari

@Noltari after a much closer inspection, and the apparent reports that this patch resolves at least some problems, and the code looks good, and it has RFC precedent, I think this makes a good addition. I cannot test this change without encountering the problem situation, but the code block checks for an error code, so this is already a logic improvement.

If we hear nothing back from the author soonish, I'd be happy to merge.

systemcrash avatar Oct 18 '25 13:10 systemcrash

This patch handles status code option only inside IA_PREFIX option while it should also handle status code option inside IA_ADDR option, thus not providing a generic handling of status code options

dedeckeh avatar Oct 18 '25 17:10 dedeckeh

This patch handles status code option only inside IA_PREFIX option while it should also handle status code option inside IA_ADDR option, thus not providing a generic handling of status code options

I agree that odhcpd could do that in the IA_ADDR option also, but that's not what this patch intends to fix. Such a fix would be trivial anyway (though is not the onus of PR author).

systemcrash avatar Oct 18 '25 18:10 systemcrash

Superseeded by https://github.com/openwrt/odhcp6c/pull/103

Noltari avatar Oct 19 '25 14:10 Noltari

For information, I have sent an e-mail to @lukedd yesterday.

Neustradamus avatar Oct 19 '25 14:10 Neustradamus

I just saw the newer comments on this, great to see some activity in this repo again! Thanks for sorting this out and getting a fix merged

lukedd avatar Dec 01 '25 22:12 lukedd