What's new

Diversion Diversion - the Router Ad-Blocker v4.2.x (see new thread for 4.3.x)

  • 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!

I decided not to try and fix the problem because I don't know what the problem is. I hope somebody more experienced person knows what I should do.
Good course of action. I should mention that I tried reinstalling Diversion through amtm and it didn't work. Now whenever I try to access Diversion from amtm I get the message "Running function reinstall" before it errors out and returns me to the amtm menu.

I'll try rebooting the router later but right now I'm working from home (as is my wife) and my kids are remote learning so a reboot would only get me yelled at.
 
Same issue hereon my RT-AC86U. Now getting these errors:

Code:
/opt/bin/diversion: line 66: /opt/bin/grep: Accessing a corrupted shared library
/opt/bin/diversion: line 66: /opt/bin/grep: Accessing a corrupted shared library
/opt/bin/diversion: line 66: /opt/bin/grep: Accessing a corrupted shared library
/opt/bin/diversion: line 66: /opt/bin/grep: Accessing a corrupted shared library
/opt/bin/diversion: line 66: /opt/bin/grep: Accessing a corrupted shared library
/opt/bin/diversion: line 66: /opt/bin/grep: Accessing a corrupted shared library
/opt/bin/diversion: line 66: /opt/bin/grep: Accessing a corrupted shared library
/opt/bin/diversion: line 66: /opt/bin/grep: Accessing a corrupted shared library
Diversion 4.2.0                  by thelonelycoder

RT-AC86U (aarch64) FW-386.3 @ 192.168.0.1 IPv6

90,966  blocked domains by  0  hosts file(s)
hosts list empty, blocking list update will not run
2.004M t  10,907 w  2,929 n ads since Oct 02 17:20

Also see this:

Code:
Done  Added missing swap file entry to /jffs/scripts/post-mount

Result being my Diversion is, to use the technical term, borked.

Looks like your USB flash drive is corrupted, I would run a disk check as a first step.
 
Looks like your USB flash drive is corrupted, I would run a disk check as a first step.
Was wondering about that. I'll reboot as soon as I can and see what the disk check shows.

EDIT: Rebooted and the USB wouldn't mount, with disk check not recognising the formatting. So something had definitely gone wrong. Used amtm to reformat, add a swap file and then re-install Diversion and Skynet. Everything is working and the disk check script shows no errors.
 
Last edited:
Solved:
http://www.snbforums.com/threads/ac87u-all-download-attempts-failed.75049/post-716574

Setting the .curlrc file in the $HOME directory to 'insecure' works !!!
I had the same issue with RT-AC56U running 384.6 firmware.

At least it will allow you to install updates !!!
:)
Got it working. I didn't realize this was literally the command:
Code:
echo insecure > /root/.curlrc

Toss it in a start script and never worry again, it appears... (Untested until the next version comes out, though.)
 
EDIT: Rebooted and the USB wouldn't mount, with disk check not recognising the formatting. So something had definitely gone wrong. Used amtm to reformat, add a swap file and then re-install Diversion and Skynet. Everything is working and the disk check script shows no errors.
Glad to hear you got your Diversion up and running.

I got mine as well. :)

After cold boot, option 1 (= Diversion) was missing from amtm. So I just chose "i" and installed Diversion again. It only took a couple of seconds and all the settings were restored from backup automatically.

And Diversion is up to date too. From Merlin GUI (LAN - Diversion) you can see that "All good, Diversion is up to date."

Don't know what the glitch was. But the problem is solved now.
 
After installing latest update and while trying to setup communication option after inserting required data having following error. It works before an update. Please help.

Code:
Can't open /jffs/addons/amtm/mail/emailpw.enc for writing, No such file or directory
4147843088:error:02001002:lib(2):func(1):reason(2):NA:0:fopen('/jffs/addons/amtm/mail/emailpw.enc','wb')
4147843088:error:2006D080:lib(32):func(109):reason(128):NA:0:
/opt/bin/diversion: line 86: can't create /jffs/addons/amtm/mail/email.conf: nonexistent directory
...
 
After installing latest update and while trying to setup communication option after inserting required data
With "latest update", do you mean the original v.4.2.0? Or the hotfix released later?

Imho, it is always a bit problematic to say "latest update".
 
both, including today update without the number.

Are you aware of this info which in mentioned in the OP:

CHANGED: email settings and password files moved to /jffs/addons/amtm/mail

  • The email password is auto-re-encrypted if the routers openssl version requires it. Please check email function after the update. You may have to re-enter the password if my logic failed.
  • Third party scripts that use the Diversion email settings need to update the path to email.conf and the password decryption code.
 
Last edited:
The problem that i don't know how to do that, can you please help. Thanks.
  • Third party scripts that use the Diversion email settings need to update the path to email.conf and the password decryption code.
 
The problem that i don't know how to do that, can you please help. Thanks.
I am not an expert, sorry.

All I need is that Diversion sends reports to my gmail. That works OK after I updated my credentials (gmail app password etc.) after updating to v.4.2.0.
 
It would be good if the directory was created by Diversion :mad: Fix is out.
After installing latest update and while trying to setup communication option after inserting required data having following error. It works before an update. Please help.

Code:
Can't open /jffs/addons/amtm/mail/emailpw.enc for writing, No such file or directory
4147843088:error:02001002:lib(2):func(1):reason(2):NA:0:fopen('/jffs/addons/amtm/mail/emailpw.enc','wb')
4147843088:error:2006D080:lib(32):func(109):reason(128):NA:0:
/opt/bin/diversion: line 86: can't create /jffs/addons/amtm/mail/email.conf: nonexistent directory
...
 
A hotfix for Diversion 4.2.0 has been uploaded, no version change.

This creates the email directory at /jffs/addons/amtm/mail when no previous files were present in the old location. Thanks for reporting @Galgofa .

Use u to update Diversion, or use the WebUI update function.
 
Thanks for the new version.

Sidenote: what is the command line way to enable or disable diversion via ssh?

Theres instances where i need to disable it for several minutes. I've been manually using the ssh ui to disable and then re-enable. I'd prefer to be able to script it, so its easier and can automatically enable itself again after a timeout from being disabled.
 
Thanks for the new version.

Sidenote: what is the command line way to enable or disable diversion via ssh?

Theres instances where i need to disable it for several minutes. I've been manually using the ssh ui to disable and then re-enable. I'd prefer to be able to script it, so its easier and can automatically enable itself again after a timeout from being disabled.
This should help https://www.snbforums.com/threads/ios-shortcut-for-diversion.55974/post-491487
 
Thanks for the new version.

Sidenote: what is the command line way to enable or disable diversion via ssh?

Theres instances where i need to disable it for several minutes. I've been manually using the ssh ui to disable and then re-enable. I'd prefer to be able to script it, so its easier and can automatically enable itself again after a timeout from being disabled.
Diversion does indeed have some interactive commands.
To see the options, enter
Code:
diversion help
or diversion h to see the list of available commands:
Code:
 Welcome
 This is Diversion 4.2.0

 Usage: diversion [option]
 Example: 'diversion disable'
 Example: 'diversion' (no option) opens full SSH UI

    a or adblocking        disables/enables ad-blocking
    ac or count_ads        counts newly blocked ads

    bu            updates the blocking list
    disable            disables all Diversion services
    enable            enables active Diversion services

    f or follow        tails (follows) the Dnsmasq log file
    fs            fast switches between blocking lists
    h or help        opens this help menu
    l or logging        disables/enables logging

    unmount            stops Diversion and Entware services when disk is ejected through WebUI
                this action is done automatically trough /jffs/scripts/unmount

    mount            starts Diversion and Entware services after unmount
                this action is done automatically trough /jffs/scripts/dnsmasq.postconf

    restart            restarts all active Diversion services
 
thanks for the diversion commands, got it sorted. thanks for the ios shortcut too, that is fantastic.

is there any kind of ios shortcut stuff for other amtm supported stuff, like skynet?
 
thanks for the diversion commands, got it sorted. thanks for the ios shortcut too, that is fantastic.

is there any kind of ios shortcut stuff for other amtm supported stuff, like skynet?
Not that I’m aware of.
 

Latest threads

Sign Up For SNBForums Daily Digest

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