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!

YazFi Bug found in YazFi 4.4.4

chutiloco

Occasional Visitor
Bug found in YazFi 4.4.4. I believe it's the reasons there are several users and post with internet issues using YasFi, or connectivity but not internet.

Setup: Asus Router AC-86U. Firmware 386.12_6.
Router connected to ISP router by ethernet cable.
How to reproduce bug? Reset ISP router or save configuration in ISP router that cut temporarly connectivity

When Asus Router loose connectivity partially, that means that it detect wan RJ-45 has cable but not providing answer, Asus Router doesn't launch any event if the time is too short but dnsmasq run again, loosing all DNS setup did by YasFi.

Here log when reseting ISP router en debug mode:
May 3 00:19:59 ovpn-client5[2973]: read UDPv4 [EHOSTUNREACH]: No route to host (fd=8,code=113)
May 3 00:20:08 ovpn-client5[2973]: read UDPv4 [EHOSTUNREACH]: No route to host (fd=8,code=113)
May 3 00:20:17 ovpn-client5[2973]: read UDPv4 [EHOSTUNREACH]: No route to host (fd=8,code=113)
May 3 00:20:26 ovpn-client5[2973]: read UDPv4 [ECONNREFUSED]: Connection refused (fd=8,code=111)
May 3 00:20:54 dnsmasq[1990]: read /etc/hosts - 22 names
May 3 00:20:54 dnsmasq[1990]: using nameserver 127.0.1.1#53
May 3 00:20:54 dnsmasq[1990]: using nameserver 127.0.1.1#53
May 3 00:21:27 ovpn-client5[2973]: Inactivity timeout (--ping-restart), restarting
May 3 00:21:27 ovpn-client5[2973]: SIGUSR1[soft,ping-restart] received, process restarting

So, in my case it take around 1 minute to ISP router to provide lan/internet connectivity. After these events show above there is only ovpn-client5 reconnecting, but again no other events. I have registered with a script all wan-event and nothing. Openvpn-event sometime I register one even on tunnel but sometime no, I don't know the reason. I assume it depends on when ISP router is restarted versus cycle watchdog internal process on Asus Router.

Ping and all connectivity is OK but DNS doesn't work at all using any YasFi subnet but "normal main" Wi-Fi net work well all the time including DNS.

Bug was quite dificult to find because it doesn't happen all the time I reset ISP router and it isn't happenning all the time in normal condition, you can be months without issue. Sometime ISP provider also reset remotly router without your knowledge due upgrade or maintenance activity in the net.

The unique way I found to solve bug is to create a script that search for event "dnsmasq*: using nameserver 127.0.1.1#53" each minute and if dnsmasq event is found and there there isn't any event line that YasFi has run completed successfully after dnsmasq, I force YasFi to reset with "YasFi runnow" command.

That solve the issue.

I have attached script in case someone else has same issue.

Save script check_dnsmasq_failure.sh in /jffs/scripts/
Execute authorization chmod +x /jffs/scripts/check_dnsmasq_failure.sh
Add line for recurring execution of script each minutes in /jffs/scripts/services-start
cru a check_dnsmasq "*/1 * * * * /jffs/scripts/check_dnsmasq_failure.sh"
Ensure in Asus Router, system log section, level of logging is in debug level, if not dnsmasq event will not be record in /tmp/syslog.log so script will not find the event.

Reset router

The solution isn't very top but it works. Maybe it could be an improvement for next version of YasFi?

Some way to formaly report this bug to developer?

Cheers,
 

Attachments

As an FYI, the original YazFi developer (@Jack Yaz) is no longer actively developing YazFi (see here).
As a troubleshooting step, update to the YazFi develop version (4.4.5) and see if the issue persists.
User @Martinski has occasionally provided some fixes to YazFi in the past. Its possible they might be able to review the issue and offer suggestions or include a fix in a new YazFi develop version.

To update to the YazFi develop version issue the following two commands to the router via SSH.
Code:
/jffs/scripts/YazFi develop
/jffs/scripts/YazFi forceupdate
One may want to reboot the router after updating to the YazFi develop version.
 
What makes this a YazFi bug (I don’t use YazFi)? If dnsmasq restarted, the postconf should run. If dnsmasq didn’t restart, how is that YazFi’s fault?

dnsmasq will also log those nameserver messages if it receives a SIGHUP signal, but it won’t restart and lose the dhcp configuration.
 
@bennor Thanks for feedback. I don't really need any additional fix, the script I have attached works very well for the specific bug in my case. I just wanted to inform in case other users affected (for sure) or if someone was developing YazFi and it was easy to include fix in next release :)
 
Last edited:
What makes this a YazFi bug (I don’t use YazFi)? If dnsmasq restarted, the postconf should run. If dnsmasq didn’t restart, how is that YazFi’s fault?

dnsmasq will also log those nameserver messages if it receives a SIGHUP signal, but it won’t restart and lose the dhcp configuration.
YazFi track events that can affect his configuration. YazFi even has a cron for check that run each 10 minutes. If dnsmasq reset for whatever reason, according firmware in Asus Router, YazFi should track it to launch reconfiguration. YazFi do it when booting router, it runs a post configuration for dnsmasq. Bug is that it doesn't do reconfiguation in all cases like example I'm mentioning above
 

Latest threads

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