What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Diversion allowlist.conf crashes dnsmasq

HaiQ

New Around Here
Hi everyone,

since 3 or 4 weeks I observe connectivity losses of my ASUS AX58u running ASUSWRT Merlin. I figured out, that the problem comes from DNS queries not answered.
The log says
Code:
Apr 10 02:06:25 rc_service: watchdog 1734:notify_rc start_dnsmasq
Apr 10 02:06:25 custom_script: Running /jffs/scripts/service-event (args: start dnsmasq)
Apr 10 02:06:25 custom_config: Appending content of /jffs/configs/dnsmasq.conf.add.
Apr 10 02:06:25 custom_script: Running /jffs/scripts/dnsmasq.postconf (args: /etc/dnsmasq.conf)
Apr 10 02:06:25 Diversion: restarted Dnsmasq to apply settings
Apr 10 02:06:25 dnsmasq[915]: error at line 31 of /opt/share/diversion/list/allowlist.conf
Apr 10 02:06:25 dnsmasq[915]: FAILED to start up

I checked `allowlist.conf` at line 31 and found a weird encoded entry. I attached the file here.(I added .txt for uploading)
When I remove the line, everything starts working again.
Since with every list update (in my case thursday early morning), the list gets replaced again with the one with the faulty line. I switched off "support SNB" in Diversion, but the problem still comes back with the next update. Disable Diversion completly solves this too.

Does anyone know where this strange encoded line comes from and why it crashes dnsmasq?
 

Attachments

Last edited:
It's clearly gibberish, but where does it come from? Can you run this command over SSH?
Code:
head -n -0 /jffs/addons/shared-whitelists/*
Any other addons in use, like Skynet?
 
The file likely is corrupted.
First, check that the allowlist does not also contain that - likely - binary code:
Code:
cat /opt/share/diversion/list/allowlist
If so remove the line from that file.
Then, remove the auto generated allowlist.conf file:
Code:
rm /opt/share/diversion/list/allowlist.conf
Then restart dnsmasq:
Code:
service restart_dnsmasq
Then run a manual blocking list update in Diversion with b, 3. This will recreate the allowlist.conf file.
 
thanks for the quick reply!

It's clearly gibberish, but where does it come from? Can you run this command over SSH?
Code:
head -n -0 /jffs/addons/shared-whitelists/*
Any other addons in use, like Skynet?
this prints the faulty line as well. No, no other addons in use.

The file likely is corrupted.
First, check that the allowlist does not also contain that - likely - binary code:
Code:
cat /opt/share/diversion/list/allowlist
If so remove the line from that file.
Then, remove the auto generated allowlist.conf file:
Code:
rm /opt/share/diversion/list/allowlist.conf
Then restart dnsmasq:
Code:
service restart_dnsmasq
Then run a manual blocking list update in Diversion with b, 3. This will recreate the allowlist.conf file.
I could not perform this steps.
Code:
cat /opt/share/diversion/list/allowlist
is empty.
manualy re-creating the allowlist.conf with b, 3 throws "hostfile not found or empty".

Since you both assume that the file is corrupted, I tried to repair the USB drive and used the reinstall option in Diversion but with no success. I then replaced the drive and freshly installed entware and Diversion. Now everything is fine again, the hostfile exists and the allowlist has no faulty lines.
Edit: And running 3,b finishes without errors.

I think you were right with file/drive corruption and replacing the usb drive solved that.
I will be sure next week on Thursday.
Thank you for your help :)
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top