MartineauUK/Unbound-Asuswrt-Merlin

`dnsmasq disable` causes a bad format line in `dnsmasq.conf.add` when guest network is used

Opened this issue · 0 comments

  • Firmware: AsusWRT-Merlin 3004.388.8
  • Router: Asus GT-AX6000
  • Unbound Manager: v3.25

I configure Unbound to be the process that listen on port 53UDP, using dnsmasq disable in unbound_manager advanced.

This creates a new file at /jffs/configs/dnsmasq.conf.add.

I use guest networks, then this part is executed:

if [ $FIRMWARE -ge 38600 ];then # v3.22

br2 is my guest network. And a bad line is added to dnsmasq.conf.add file:

dhcp-option=br2,6,62.36.225.150 80.58.0.33      # unbound_manager

62.36.225.150 and 80.58.0.33 are my DNS servers from WAN config. And they are added because

ROUTER=$(nvram get wan0_dns) # v3.22

and...

[ -z "$(grep -F "dhcp-option=$BR,6,$ROUTER" /jffs/configs/dnsmasq.conf.add)" ] && echo -e "dhcp-option=$BR,6,$ROUTER # unbound_manager" >> /jffs/configs/dnsmasq.conf.add # v3.22

causing an error in dnsmasq process:
bad IPv4 address at line 37 of /etc/dnsmasq.conf