[Cerowrt-devel] netifd/procd problems interfacing with dnsmasq/pimd/minisspd

Dave Taht dave.taht at gmail.com
Tue Oct 15 03:20:28 EDT 2013


>From what I see, the problems we are seeing in dnsmasq startup since
august are also problems in pimd and minissdpd. They have a common
cause in the ongoing switch in openwrt to the lightweight netifd and
procd methods of process management.

It seems that it is merely a matter of luck that dnsmasq works in the
simplified configuration that is the openwrt default. In cerowrt it
takes 17 seconds to fully initialize dnsmasq for the 6 interfaces
extent (all spent in the /etc/init.d/dnsmasq script it looks like). My
*guess* is that between starting dnsmasq and creating a working setup
for the first interface, a whole bunch of signals arrive bringing up
the other interfaces that are missed.

I have no idea how to fix this, doc on netifd and procd are kind of sparse.

?

A first boot conf file ends on the first defined device:

... auto-generated conf elided ...
dhcp-range=se00,172.30.42.2,172.30.42.27,255.255.255.224,24h
dhcp-option=se00,42,0.0.0.0
dhcp-option=se00,44,0.0.0.0
dhcp-option=se00,45,0.0.0.0
dhcp-option=se00,46,8

... conf file ends here on first boot ...

... but if dnsmasq is started manually after boot is complete, the
remainder of the interfaces are found

dhcp-range=sw00,172.30.42.66,172.30.42.91,255.255.255.224,24h
dhcp-option=sw00,42,0.0.0.0
dhcp-option=sw00,44,0.0.0.0
dhcp-option=sw00,45,0.0.0.0
dhcp-option=sw00,46,8
dhcp-range=sw10,172.30.42.98,172.30.42.123,255.255.255.224,24h

.... remainder of devices elided...

Another guess is that dnsmasq is smart enough to come up even when the
interfaces it's defined for don't exist.

 A faster way to start it might be to cache and cmp or md5hash the
/etc/config/dhcp file, keep that around between boots, and re-use the
/var/etc/dnsmasq.conf file if the dhcp file doesn't change, but it's
unclear if the constants are limited to that file...


...


It is unfair of me to complain that pimd and minissdpd broke as of
august as those are out-of openwrt's main tree (in ceropackages),
but...

Tue Oct 15 06:37:05 2013 daemon.err minissdpd[952]: setsockopt(udp,
IP_ADD_MEMBERSHIP)(172.30.42.97): No such device
Tue Oct 15 06:37:05 2013 daemon.warn minissdpd[952]: Failed to add
IPv4 multicast membership for interface 172.30.42.97.
Tue Oct 15 06:37:05 2013 daemon.err minissdpd[952]: setsockopt(udp,
IP_ADD_MEMBERSHIP)(172.30.42.65): No such device
Tue Oct 15 06:37:05 2013 daemon.warn minissdpd[952]: Failed to add
IPv4 multicast membership for interface 172.30.42.65.
Tue Oct 15 06:37:05 2013 daemon.err minissdpd[952]: setsockopt(udp,
IP_ADD_MEMBERSHIP)(172.30.42.1): No such device
Tue Oct 15 06:37:05 2013 daemon.warn minissdpd[952]: Failed to add
IPv4 multicast membership for interface 172.30.42.1.
Tue Oct 15 06:37:07 2013 kern.info kernel: [   20.625000] IPv6:
ADDRCONF(NETDEV_UP): ge00: link is not ready

pimd only fails on first boot (I guess while jffs2 is formatting), it
seems to work on a reboot.


-- 
Dave Täht

Fixing bufferbloat with cerowrt: http://www.teklibre.com/cerowrt/subscribe.html



More information about the Cerowrt-devel mailing list