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:
Slava-Shchipunov
2025-12-29 19:17:53 +07:00
committed by GitHub
parent 866b0abe82
commit 61b1e904e9

View File

@@ -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
};