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
Updated by Jim Pingle almost 2 years ago
- Status changed from New to Duplicate
This seems to be the same as #12811
Updated by Phil Lee almost 2 years ago
In addition to the above, I would think that ppp-linkdown, when bringing down an IPv6 network, should also be removing the place holder files from /tmp. Currently the signposted files to show the IPv6 is up are left in the /tmp folder. Looking at the most recent script in source, it has been modified from 2.6.0 to rename the router signposted file to router.last, rather than delete it. Therefore should it be something like this to remove the files for IPv4 and 6 respectively.
@# Remove tmp signpost files
if [ "${PROTOCOL}" "inet" ]; then
if [ -f "/tmp/${IF}_router" ]; then
/bin/mv /tmp/${IF}_router /tmp/${IF}_router.last
fi
/bin/rm -f /tmp/${IF}up
/bin/rm -f /tmp/${IF}_ip
fi
if [ "${PROTOCOL}" "inet6" ]; then
if [ -f "/tmp/${IF}_routerv6" ]; then
/bin/mv /tmp/${IF}_routerv6 /tmp/${IF}_routerv6.last
fi
/bin/rm -f /tmp/${IF}upv6
/bin/rm -f /tmp/${IF}_ipv6
fi@
Updated by Phil Lee about 1 year ago
Jim Pingle wrote in #note-1:
This seems to be the same as #12811
Still happening in 2.7.0, in effect worse in 2.7.0 as IPv6 comes up but then IPv4 goes down and there is no connectivity on IPv4. I simply copied the same /usr/local/sbin/ppp-linkdown file that I fixed in 2.6.0 over the one in 2.7.0 and all issues resolved.
Why do these bugs get closed and never fixed?