OpenWrt Forum Archive

Topic: dnsmasq unnecessarily bound to lo

The content of this topic has been archived on 28 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I use split networks at home and therefore broke the br0 device. As I want dhcp on lan and wifi interface I played around with S50dnsmasq. I simply copied it to S51dnsmasq and changed iface=wifi which did not work, some obscure
"dnsmasq: failed to bind listening socket: Address already in use"

I finally found out that dnsmasq per default binds to lo (for whatever reaseon).
By excluding lo (via -I) and explicitely only binding to given iface one is able to start more than one dnsmasq instance (also chaning lease file name).

One only needs to modify the args like this:

args="-Z -l /tmp/dhcp.${ifname}.leases -K -F $(int2ip $start),$(int2ip $end),$(int2ip $netmask),12h -z -i ${ifname} -I lo"

I propose changing /etc/init.d/S50dnsmasq as it seems to break nothing and enables dhcp in split network situations.

P.S.: This is my try to contact openwrt.org developers, so please be gentle if i violated etiquette.

regards
roland lezuo

tbfg wrote:

P.S.: This is my try to contact openwrt.org developers, so please be gentle if i violated etiquette.

I'm new here too, so I don't know the established etiquette, but I think you'd be assisting the developers, and also be more likely to get their  (eventual) attention, if you were to post your suggestion to the bug tracker.

The discussion might have continued from here.