because in >= Stretch, most systems don't have ethX devices any more.

Signed-off-by: Fabian Grünbichler <f.gruenbich...@proxmox.com>
---
Note: requires patch introducing this RE in pve-common

 PVE/Service/pvestatd.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/PVE/Service/pvestatd.pm b/PVE/Service/pvestatd.pm
index bc62b90..2c8454d 100755
--- a/PVE/Service/pvestatd.pm
+++ b/PVE/Service/pvestatd.pm
@@ -12,6 +12,7 @@ use PVE::ProcFSTools;
 use PVE::CpuSet;
 use Filesys::Df;
 use PVE::INotify;
+use PVE::Network;
 use PVE::Cluster qw(cfs_read_file);
 use PVE::Storage;
 use PVE::QemuServer;
@@ -94,7 +95,7 @@ sub update_node_status {
     my $netin = 0;
     my $netout = 0;
     foreach my $dev (keys %$netdev) {
-       next if $dev !~ m/^eth\d+$/;
+       next if $dev !~ m/^$PVE::Network::PHYSICAL_NIC_RE$/;
        $netin += $netdev->{$dev}->{receive};
        $netout += $netdev->{$dev}->{transmit};
     }
-- 
2.1.4


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to