[pve-devel] [PATCH common] add weave to interfaces

Dominik Csapak d.csapak at proxmox.com
Wed Jul 13 10:18:57 CEST 2016


this returns a weave interface of type 'weave',
if it exists in /proc/net/dev

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/PVE/INotify.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm
index 7fb3490..3acb436 100644
--- a/src/PVE/INotify.pm
+++ b/src/PVE/INotify.pm
@@ -909,6 +909,8 @@ sub __read_etc_network_interfaces {
     foreach my $ifname (@$active_ifaces) {
 	if (my $iface = $ifaces->{$ifname}) {
 	    $iface->{active} = 1;
+	} elsif ($ifname =~ m/^weave$/) {
+	    $ifaces->{weave}->{active} = 1;
 	}
     }
 
@@ -986,6 +988,8 @@ sub __read_etc_network_interfaces {
 	    }
 	} elsif ($iface =~ m/^lo$/) {
 	    $d->{type} = 'loopback';
+	} elsif ($iface =~ m/^weave$/) {
+	    $d->{type} = 'weave';
 	} else {
 	    if (!$d->{ovs_type}) {
 		$d->{type} = 'unknown';
-- 
2.1.4




More information about the pve-devel mailing list