Facing problem with running pppd on linux 32-bit kernel releated to this commit:
81ad945
It seems like 32-bit kernel exporting only 32-bit counters to sysfs, and this commit changed default way of getting counters.
if (get_ppp_stats_sysfs(u, stats)) {
func = get_ppp_stats_sysfs;
return 1;
}
warn("statistics falling back to ioctl which only supports 32-bit counters");
func = get_ppp_stats_ioctl;
TIMEOUT(ppp_stats_poller, (void*)(long)u, 25);
}
Function get_ppp_stats_sysfs succeeds and then we rewrite default to get_ppp_stats_sysfs. But in 32-bit kernel it returns only 32-bit counters (at least for ppp) and we are not checking for overlap.
After removing get_ppp_stats_sysfs call, got 64-bit counters working again as get_ppp_stats_ioctl is overlap-friendly.
I think we must detect kernel at runtime (not compile time, as we can run 32-bit pppd on 64-bit kernel), and if it 32-bit, then do not use sysfs stats.
Facing problem with running pppd on linux 32-bit kernel releated to this commit:
81ad945
It seems like 32-bit kernel exporting only 32-bit counters to sysfs, and this commit changed default way of getting counters.
Function get_ppp_stats_sysfs succeeds and then we rewrite default to get_ppp_stats_sysfs. But in 32-bit kernel it returns only 32-bit counters (at least for ppp) and we are not checking for overlap.
After removing get_ppp_stats_sysfs call, got 64-bit counters working again as get_ppp_stats_ioctl is overlap-friendly.
I think we must detect kernel at runtime (not compile time, as we can run 32-bit pppd on 64-bit kernel), and if it 32-bit, then do not use sysfs stats.