[pve-devel] [PATCH manager] fix #871: netstat: include veth devices

Wolfgang Bumiller w.bumiller at proxmox.com
Tue Jan 19 09:45:38 CET 2016


Include container's veth devices in /nodes/{node}/netstat
---

 @Stefan Priebe:
 As the implementation came from you with commit 72eb5b9f and I don't
 see other references to this netstat function in the code I'd like
 to ask if you agree with this change?

 PVE/API2/Nodes.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm
index 311d874..b48478d 100644
--- a/PVE/API2/Nodes.pm
+++ b/PVE/API2/Nodes.pm
@@ -290,7 +290,7 @@ __PACKAGE__->register_method({
 
 	my $netdev = PVE::ProcFSTools::read_proc_net_dev();
 	foreach my $dev (keys %$netdev) {
-		next if $dev !~ m/^tap([1-9]\d*)i(\d+)$/;
+		next if $dev !~ m/^(?:tap|veth)([1-9]\d*)i(\d+)$/;
 	        my $vmid = $1;
 	        my $netid = $2;
 
-- 
2.1.4





More information about the pve-devel mailing list