openwrt / odhcpd

This repository is a mirror of https://git.openwrt.org/?p=project/odhcpd.git. Pull requests will be accepted which will be merged in odhcpd.git
GNU General Public License v2.0
163 stars 99 forks source link

Support an option like dnsmasq --force-fast-ra #44

Closed cuviper closed 9 years ago

cuviper commented 9 years ago

I'm having an issue with my Samsung Galaxy S6 where the IPv6 preferred lifetime drops to zero while the device is asleep, because it apparently never see the RA to refresh it. I found old bug reports on both Android and Samsung -- this seems to be a long-standing and ignored issue. I can even confirm that ping6 drops as soon as the device sleeps.

So, in the Android report I read that dnsmasq added a --force-fast-ra option here which keeps spamming RAs every 10 seconds. That way the device will get an RA not too long after waking up. Crude, but effective.

Could odhcpd get a similar configuration option? Perhaps as a custom override of MaxRtrAdvInterval?

sbyx commented 9 years ago

Acknowledged, though the dnsmasq "solution" doesn't address the problem really. Yes it allows for a fast recovery after turning on the screen however IPv6 is still broken while in standby (e.g. push-messages). I will try to add a feature which sends unicast RAs to known hosts, which should actually work-around better and is better for links like WiFi which generally do not play that well with MC.

cuviper commented 9 years ago

Thanks, I appreciate you trying to find an even better solution!

sbyx commented 9 years ago

Pleae see: https://lists.openwrt.org/pipermail/openwrt-devel/2015-July/034328.html

sbyx commented 9 years ago

That workaround doesn't seem to work, since the phones seem to ignore even much if not all of unicast traffic. I changed default lifetime to 65535 by default now if there is an address with suitable long lifetime, so ideally the phone can stay up for up to 18h without RAs. Additionally I added a parameter: option ra_maxinterval which lets you tune the maximum RA interval (real value might be lower depending on address lifetimes but not higher).

cuviper commented 9 years ago

I didn't get a chance to try the unicast RAs myself, but I won't bother since you already removed it. I have loaded the current commit 053ca41 onto my router now, and can see the longer lifetime already. I'll run with that for a while and see how the experience goes. Hopefully I won't even need to bother with the max interval. Thanks!

cuviper commented 9 years ago

So far, it has worked really well. I haven't caught the phone's remaining lifetime any less than 60000, so maybe it is eventually picking up some RAs after all? Whatever way it's staying alive, I'm happy -- thanks again!