I have an internet provider that resets the public IP every 12 hours, so my wan connection gets reset.
With my previous router, this action wasn’t noticeable to me, but now, with Flint 2 MT6000 I realized a certain delay. After looking at the logs, I saw a consistent 30s delay.
After digging a bit, I found this script: /lib/netifd/proto/ppp.sh which looks like it’s triggered on wan reconnections.
Looks like it’s a modified version of the official openwrt: openwrt/package/network/services/ppp/files/ppp.sh at openwrt-24.10 · openwrt/openwrt · GitHub
The bug:
There is a add_fail_count method that’s triggered on every reconnection
add_fail_count() {
local count=0
[ -f $FAIL_COUNT ] && {
count=$(cat $FAIL_COUNT)
}
let count=count+1
echo $count > $FAIL_COUNT
}
Stored in FAIL_COUNT=/tmp/pppoe_fail_count, but it should reset after a successful connection. (removing the file could be enough).
The following method adds the delay if fails are gt 3
delay_dail() {
local count=0
[ -f $FAIL_COUNT ] && {
count=$(cat $FAIL_COUNT)
}
[ $count -gt 3 ] && {
sleep 30
}
}
First of all, I want to ask if this custom code was added by the GL iNet team. If so, can it be removed?