Reliably detecting the absence of IPv6
Philip Prindeville
philipp_subx at redfish-solutions.com
Thu Dec 11 12:11:41 PST 2025
> On Dec 11, 2025, at 12:41 AM, Jonas Lochmann <openwrt at jonaslochmann.de> wrote:
>
> Am Wed, Dec 10, 2025 at 08:44:00PM -0700, schrieb Philip Prindeville via openwrt-devel:
>
>> I previously tested with -z “$(ip -6 -o route show default)” but as someone pointed out, if at the time that Bind starts up, someone later brings up an IPv6 default route (say via DHCP or a tunnel), then this caused a denial of service.
>>
>> I don’t imagine this is the only case of having to know if IPv6 is deliberately absent on a given router or not.
>>
>> What is the best canonical way to solve this?
>
> Happy Eyeballs - just try it and see if it works. It would expect bind
> to do exactly that.
Sorry, try which out?
>
> You can ask the routing table or ask netifd. Both are observable (change
> notifications are available) so that you could adjust your configuration
> depending on the current status. But the existence of an IPv6 default
> route does not imply that it works. mwan uses configurable connectivity
> checks to solve that issue - in most setups, this are pings to some
> predefined servers.
I’m open to other ideas.
-Philip
More information about the openwrt-devel
mailing list