Gl_monitor kills dnsmasq every 30 seconds

I have an X750 Spitz that I just upgraded to 3.027. I notice in the logs that gl_monitor kills and restarts dnsmasq every 30 seconds, complaining about “dhcp-range for lan network is missing”. I have dhcp disabled (both ipv4 and ipv6) for the lan interface 'cause I have a separate router that does the DHCP. How do I fix gl_monitor?

Here’s what the system log looks like:

Sun Oct 27 23:04:23 2019 user.notice gl_monitor: dhcp-range for lan network is missing, restart dnsmasq
Sun Oct 27 23:04:23 2019 daemon.info dnsmasq[15444]: exiting on receipt of SIGTERM
Sun Oct 27 23:04:24 2019 user.notice dnsmasq: DNS rebinding protection is active, will discard upstream RFC1918 responses!
Sun Oct 27 23:04:24 2019 user.notice dnsmasq: Allowing 127.0.0.0/8 responses
Sun Oct 27 23:04:24 2019 daemon.info dnsmasq[18373]: started, version 2.80test2 cachesize 150
...
Sun Oct 27 23:04:55 2019 user.notice gl_monitor: dhcp-range for lan network is missing, restart dnsmasq
Sun Oct 27 23:04:55 2019 daemon.info dnsmasq[18373]: exiting on receipt of SIGTERM
Sun Oct 27 23:04:55 2019 user.notice dnsmasq: DNS rebinding protection is active, will discard upstream RFC1918 responses!
Sun Oct 27 23:04:55 2019 user.notice dnsmasq: Allowing 127.0.0.0/8 responses
Sun Oct 27 23:04:56 2019 daemon.info dnsmasq[20780]: started, version 2.80test2 cachesize 150
...
Sun Oct 27 23:05:27 2019 user.notice gl_monitor: dhcp-range for lan network is missing, restart dnsmasq
Sun Oct 27 23:05:27 2019 daemon.info dnsmasq[20780]: exiting on receipt of SIGTERM
Sun Oct 27 23:05:27 2019 user.notice dnsmasq: DNS rebinding protection is active, will discard upstream RFC1918 responses!
Sun Oct 27 23:05:27 2019 user.notice dnsmasq: Allowing 127.0.0.0/8 responses
Sun Oct 27 23:05:28 2019 daemon.info dnsmasq[23249]: started, version 2.80test2 cachesize 150
...

Have you configured WAN port as LAN port?

1 Like

I’m in the same boat as the OP. I’m using a GL-MT300N-V2 as an access point and print server, so I’ve used the Luci interface to put make the WAN port in the same VLAN as the LAN port and disabled DHCP on the LAN interface. I keep getting the following (and a bunch of lines from dnsmasq startup) every 30 seconds:

gl_monitor: dhcp-range for lan network is missing, restart dnsmasq

How can I fix this? Do I need to keep gl_monitor running? can I just disable the service from starting and end the process?

Reason is /usr/bin/gl_monitor cannot cope with DHCP disabled on LAN interface. I have disabled DHCP on my LAN interface because I’m handling that on a pihole instance for my network.

To fix this, /usr/bin/gl_monitor would need to also check for value no-dhcp-interface=br-lan in the dnsmasq configuration file in /var/etc/dnsmasq.conf.*. Thus, just add this line as the first line in function ‘restore_lan_dnsmasq()’ in /usr/bin/gl_monitor:

[ ! -z "$(grep 'no-dhcp-interface=br-lan' /var/etc/dnsmasq.conf.*)" ] && return

which is effectively silencing the error after restarting /usr/bin/gl_monitor with:

/etc/init.d/gl_monitor restart