Joined: 26 Mar 2013 Posts: 1855 Location: Hung Hom, Hong Kong
Posted: Tue Sep 21, 2021 13:19 Post subject: DD-WRT BS build 47474 and Asus RT-N18U
Router/Version:Asus RT-N18U (rev. A1)
Firmware: DD-WRT v3.0-r47474 std (09/20/21)
Kernel: Linux 4.4.283 #4100 Mon Sep 20 08:05:19 +07 2021 armv7l
Previous: DD-WRT v3.0-r47282 std (08/30/21)
Mode: WAN @ DHCP, Wireless @ AP
Status: Working (
Not 24/7; Not using IPv6, VAP, VPN, CTF, FA;
DDNS OK; Port-forwarding OK;
Using NAS (ksmbd, minidlna), USB (jffs, opt), Recursive DNS Unbound;
Entware core (CPU: armv71) installed without problem
)
Reset: NO reset during firmware upgrade but cold boot
File:https://download1.dd-wrt.com/dd-wrtv2/downloads/betas/2021/09-20-2021-r47474/asus-rt-n18u/asus_rt-n18u-firmware.trx
Summary
There were still error messages about ksmbd and wsdd2, though Samba was working. System init still tried to start ksmbd 4 times. Most would expect only 1-2 attempts.
process_monitor was started 3 times based on the process id, and 2 time-sync change.
Code:
# grep -E 'process' /var/log/messages | grep -i started
Jan 1 08:00:34 RT-N18U-HST user.info : process_monitor : successfully started
Sep 21 21:05:53 RT-N18U-HST user.info : process_monitor : successfully started
Sep 21 21:06:02 RT-N18U-HST user.info : process_monitor : successfully started
Unsuccessful logins now got an error page "401 UNAUTHORIZED Authorization required. Wrong username and/or password!". Um... is it a JPEG? Could not copy any text!
Firmware Size
From 30515200 (b.31277) to 24711168 (b.33555) = -5804032 bytes
From 24711168 (b.33555) to 27054080 (b.34929) = 2342912 bytes
From 27054080 (b.34929) to 26640384 (b.35531) = -413696 bytes
From 26640384 (b.35531) to 25022464 (b.36995) = -1617920 bytes
From 25022464 (b.36995) to 25427968 (b.37961) = 405504 bytes
From 25427968 (b.37961) to 25804800 (b.38570) = 376832 bytes
From 25804800 (b.38570) to 27574272 (b.38840) = 1769472 bytes
From 27574272 (b.38840) to 27774976 (b.39031) = 200704 bytes
From 27774976 (b.39031) to 27779072 (b.39137) = 4096 bytes
From 27779072 (b.39137) to 27779072 (b.39144) = 0 byte
... <snipped> ....
From 25518080 (b.45000) to 25706496 (b.45592) = 188416 bytes
From 25706496 (b.45592) to 25870336 (b.46733) = 163840 bytes
From 25153536 (b.46733) to 25145344 (b.47000) = -8192 bytes
From 25145344 (b.47000) to 25153536 (b.46979) = 8192 bytes
From 25153536 (b.46979) to 25145344 (b.47090) = -8192 bytes
From 25145344 (b.47090) to 25149440 (b.47206) = 4096 bytes
From 25149440 (b.47206) to 25153536 (b.47282) = 4096 bytes
From 25153536 (b.47282) to 25128960 (b.47474) = -24576 bytes
_________________ Router: Asus RT-N18U (rev. A1)
Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!
syslog shows nothing.
I should not have the bug, as I am using @Xvortex CFE. Actually, I have never notice problems on the router since I started using it. I would discart that possibility for now.
Perhaps there have been code changes that break it.
Yeah, that is the script.
The base structure it is the same still.
The strange thing is that it runs for a couple of hours and then dies ! Out of nowhere ! I was wondering if a watchdog was doing this, but doesnt make sense, since this is a startup script (should be whitelisted) and there should be something on the logs if the system killed any process.
Follow the actual script.
echo "<meta http-equiv=\"refresh\" content=\"10\">" > $LOGFILE
echo "["`date`"] AUTO WOL Script started. <br>" >> $LOGFILE
echo "For server: $TARGET <br>" >> $LOGFILE
echo "WOL for MAC: $MAC on port $WOLPORT <br> <br>" >> $LOGFILE
tcpdump -q -n -i any -K -l -O 'dst host 192.168.1.2 and (dst port 32400 or dst port 1900 or dst port 3005 or dst port 5353 or dst port 8324 or dst port 32410 or dst port 32412 or dst port 32413 or dst port 32414 or dst port 32469)' 2>/dev/null | while read NEW ; do
# Get the line in seconds, to minimize the number of processed commands.
NEW_TIME=`echo $NEW | awk -F'.' '{print $1}'`
if [ "$NEW_TIME" != "$OLD_TIME" ]; then
# Get the source IP for logging
SRC=`echo $NEW | awk -F'[.| ]' '{print $4"."$5"."$6"."$7}'`
# If box is alive (responding to ping)
if ping -q -c $PINGCOUNT -W $PINGWAITFRSTRESP $TARGET >/dev/null; then
echo "[`date`] NOWAKE - $TARGET accessed by $SRC <br>">> $LOGFILE
#touch /dev/null
else
echo "[`date`] _WAKE_ - $TARGET accessed by $SRC <br>">> $LOGFILE
$WOL -i $BROADCAST -p $WOLPORT $MAC >/dev/null
fi
OLD_TIME=$NEW_TIME
# Cleanup log file procedure, keeping the header and the last WAKELOGTORETAIN log lines
if [ "`wc -l $LOGFILE | awk -F'[ ]' '{print $1}'`" -gt "$(($LOGLINESTOSTORE+$HEADERSIZE))" ]; then
head -n 4 $LOGFILE > /tmp/www/wol.tmp
PURGECOUNT=$((PURGECOUNT+1))
echo "Log File purged $PURGECOUNT times, last one at $NEW_TIME <br> " >> /tmp/www/wol.tmp
grep _WAKE_ $LOGFILE | tail -n $WAKELOGTORETAIN >> /tmp/www/wol.tmp
mv /tmp/www/wol.tmp $LOGFILE
echo "<br>" >> $LOGFILE
fi
sleep $INTERVAL
fi
done
Joined: 08 May 2018 Posts: 14126 Location: Texas, USA
Posted: Tue Sep 21, 2021 18:51 Post subject:
The wol binary likely has no debug messages enabled; you may have to figure out how to track that and tcpdump to see what is killing it (?); do you have a connection watchdog configured? _________________ "Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT Pogo - A minimal level of ability is expected and needed... DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)
----------------------
Linux User #377467 counter.li.org / linuxcounter.net
Joined: 08 May 2018 Posts: 14126 Location: Texas, USA
Posted: Tue Sep 21, 2021 19:25 Post subject:
Depends on which config is used for the EA6900 build. The .config_northstar_16m, .config_northstar_micro, and .config_northstar_mini do not have it enabled (and two of those files have it in there twice); the .config_northstar_std_dhd_128K and .config_northstar have it enabled:
tcpdump is there.
I debugged the code already.
It is working just fine !
The problem, as I said: it runs for a few hours and then dies. Generates the wol.txt and all ...
I will run it with -x in foreground until it dies and see what is happening. I will let you guys know.
Thanks for the tips
I was using an older version:
Router Model
Netgear R7000P
Firmware Version
DD-WRT v3.0-r44970 std (12/11/20)
Kernel Version
Linux 4.4.247 #1533 SMP Fri Dec 11 10:34:25 +07 2020 armv7l
After upgrading to r47474 with reset in UI, I encountered issues related to NAS:
1. Connecting from Windows to NAS over Samba, I failed to open/list files under any folder with more than 400 files. I can always reproduce this by creating a folder with than 400 blank .txt files. It fails in both file explorer and Samba commands in PowerShell.
2. In telnet/SSH, wget command only downloads the first 1KB of any files to the mounted /opt. It stuck at saving files to xxx. I encountered this when installing entware.
wget to /tmp works fine.
A 2TB NTFS HHD is mounted to /opt.
I updated my old WRT54GL last night to 47474 nokaid (as a backup for my sis' house*) to see if the latest builds worked. Lost access after the flash, but after resetting (which seemed to be finicky too) I got into the GUI. However, after setting it up as a Client Bridge I lost GUI and telnet access; no ping either. The Switch Config page is all messed up; see pic. Reset and tried AP mode too; same thing.
For completeness, since I was researching it for BS, I found the last working CB build for the old WRT54GL was 46788. r47475 fixes the Switch Config display, but not CB/AP setup. _________________ #NAT/SFE/CTF: limited speed w/ DD#Repeater issues#DD-WRT info: FAQ, Builds, Types, Modes, Changes, Demo#
OPNsense x64 5050e ITX|DD: DIR-810L, 2*EA6900@1GHz, R6300v1, RT-N66U@663, WNDR4000@533, E1500@353,
WRT54G{Lv1.1,Sv6}@250|FreshTomato: F7D8302@532|OpenWRT: F9K1119v1, RT-ACRH13, R6220, WNDR3700v4
Joined: 26 Mar 2013 Posts: 1855 Location: Hung Hom, Hong Kong
Posted: Wed Sep 22, 2021 10:45 Post subject:
silvermoong wrote:
1. Connecting from Windows to NAS over Samba, I failed to open/list files under any folder with more than 400 files. I can always reproduce this by creating a folder with than 400 blank .txt files. It fails in both file explorer and Samba commands in PowerShell.
In the root directory? Of a FAT32 partition? Don't try that. Shove them into a sub-directory or sub-folder.
And if possible, use EXT3 file-system instead of FAT32 nor NTFS.
_________________ Router: Asus RT-N18U (rev. A1)
Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!