[pve-devel] [PATCH common 1/1] Fix #545: Allow descriptive names for network bridges and bonds

Dominic Jäger d.jaeger at proxmox.com
Wed May 15 11:49:30 CEST 2019


Allowing more descriptive names for network bridges and bonds makes
their identification easier.

Signed-off-by: Dominic Jäger <d.jaeger at proxmox.com>
---
 src/PVE/INotify.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm
index b660041..75e5010 100644
--- a/src/PVE/INotify.pm
+++ b/src/PVE/INotify.pm
@@ -1027,7 +1027,7 @@ sub __read_etc_network_interfaces {
 
     foreach my $iface (keys %$ifaces) {
 	my $d = $ifaces->{$iface};
-	if ($iface =~ m/^bond\d+$/) {
+	if ($iface =~ m/^bond\w+$/) {
 	    if (!$d->{ovs_type}) {
 		$d->{type} = 'bond';
 	    } elsif ($d->{ovs_type} eq 'OVSBond') {
@@ -1049,7 +1049,7 @@ sub __read_etc_network_interfaces {
 	    } else {
 		$d->{type} = 'unknown';
 	    }
-	} elsif ($iface =~ m/^vmbr\d+$/) {
+	} elsif ($iface =~ m/^vmbr\w+$/) {
 	    if (!$d->{ovs_type}) {
 		$d->{type} = 'bridge';
 
-- 
2.11.0




More information about the pve-devel mailing list