Reliably detecting the absence of IPv6

Philip Prindeville philipp_subx at redfish-solutions.com
Wed Dec 17 10:26:07 PST 2025



> On Dec 12, 2025, at 6:48 AM, Oldřich Jedlička <oldium.pro at gmail.com> wrote:
> 
> čt 11. 12. 2025 v 4:45 odesílatel Philip Prindeville via openwrt-devel
> <openwrt-devel at lists.openwrt.org> napsal:
>> 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.
> 
> If you have issues with network connectivity changes during startup,
> there is a way for the service to react. This is how I tried to solve
> similar startup issue (network not up or changed) for fwknopd:
> 
> https://github.com/openwrt/packages/blob/master/net/fwknop/files/fwknopd.init#L16-L45
> 
> The procd options for service startup are described here, although I
> had to check the source code to really verify what is expected as input
> (network name or linux interface name):
> 
> https://openwrt.org/docs/guide-developer/procd-init-scripts
> 
> So when you correctly define your network dependencies, you should get
> restarted by procd automatically.
> 
> Cheers,
> Oldrich.


I’ve noticed that if /etc/init.d/network restart is called, it makes the LAN interfaces go away (especially the VLAN or bridge ones) which can make dhcpd quit.

What’s the “ubus” command to get the ifnames on the group “lan”?  Or the wrapper for that?  Is it network_get_device()?

I’m wondering if I need to do:

procd_set_param netdev $dhcp_ifs

in /etc/init.d/dhcpd …
 


More information about the openwrt-devel mailing list