mirror of
https://github.com/amnezia-vpn/amneziawg-linux-kernel-module.git
synced 2026-05-17 08:26:30 +03:00
fix: use ifdef for COMPAT_CANNOT_USE_PCPU_STAT_TYPE (#129)
* fix: remove COMPAT_CANNOT_USE_PCPU_STAT_TYPE guard The compatibility guard breaks ndo_get_stats64 registration on recent kernels, causing missing or incorrect network statistics reporting. Signed-off-by: Slava-Shchipunov <92646230+Slava-Shchipunov@users.noreply.github.com> * fix: use ifdef for COMPAT_CANNOT_USE_PCPU_STAT_TYPE Signed-off-by: Slava-Shchipunov <92646230+Slava-Shchipunov@users.noreply.github.com> --------- Signed-off-by: Slava-Shchipunov <92646230+Slava-Shchipunov@users.noreply.github.com>
This commit is contained in:
@@ -246,7 +246,7 @@ static const struct net_device_ops netdev_ops = {
|
||||
.ndo_open = wg_open,
|
||||
.ndo_stop = wg_stop,
|
||||
.ndo_start_xmit = wg_xmit,
|
||||
#ifndef COMPAT_CANNOT_USE_PCPU_STAT_TYPE
|
||||
#ifdef COMPAT_CANNOT_USE_PCPU_STAT_TYPE
|
||||
.ndo_get_stats64 = dev_get_tstats64
|
||||
#endif
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user