Bug #13552
closedDashboard - uptime shows nothing and gateway widget loses default gateway soon after PPPoE comes up
0%
Description
Most attempts at bringing up PPPoE will result in about 5 seconds of uptime showing before the uptime count and the IPv4 Gateway in the Gateway widget on the dashboard disappears. Connectivity remains all okay. This appeared to have started happening when I moved to a new ISP. Troubleshooting I found when this bug happens the signpost files pppoe1_ip, pppoe1_router, pppoe1up are missing in the /tmp folder. If whist the connection is up I add these files in manually, uptime and the gateway appear back in the dashboard correctly.
On looking at the code the issue appears to be in the file /usr/local/sbin/ppp-linkdown
@ @ where at the end the IPv4 signpost files are deleted. However, the IPv4 signpost files will also be deleted if the script is called to bring down IPv6. I've modified the ppp_linkdown script file as below with an if statement around the removal of the files, so the signpost files are only deleted when the call to ppp_linkdown is related to IPv4, and this has fixed the issue, and no matter how many times I've tested, the gateway and uptime remain shown correctly. If I bring the link down, the signpost files are removed from the /tmp directory, and always appear when the link is brought back up.
# Added if statement around the removal of the IPv4 signpost files so they are only removed when the script is called for IPv4 down, and they are left if the call is for IPv6 link down.
if [ "${PROTOCOL}" == "inet" ]; then
/bin/rm -f /tmp/${IF}_router
/bin/rm -f /tmp/${IF}up
/bin/rm -f /tmp/${IF}_ip
fi
I suspect in my case for some reason the IPv6 connectivity comes up quickly then goes down again before coming back up, maybe a quirk of the ISP, so that ppp-linkdown is getting called whilst bringing up PPPoE, and because the IPv4 signpost files are deleted when that script gets run is why I see this issue.
Files