[pve-devel] [PATCH] allow random openvz interface name for non firewalled interface

Dietmar Maurer dietmar at proxmox.com
Fri May 16 11:19:44 CEST 2014


Ok, I applied a slightly different patch - hop that work for you?

diff --git a/data/PVE/Network.pm b/data/PVE/Network.pm
index ff4aa73..b141d09 100644
--- a/data/PVE/Network.pm
+++ b/data/PVE/Network.pm
@@ -66,7 +66,7 @@ my $read_bridge_mtu = sub {
 };
 
 my $parse_tap_devive_name = sub {
-    my ($iface) = @_;
+    my ($iface, $noerr) = @_;
 
     my ($vmid, $devid);
 
@@ -77,7 +77,8 @@ my $parse_tap_devive_name = sub {
        $vmid = $1;
        $devid = $2;
     } else {
-       die "wrong interface name $iface";
+       return undef if $noerr;
+       die "can't create firewall bridge for random interface name '$iface'\n";
     }
 
     return ($vmid, $devid);
@@ -193,7 +194,8 @@ my $create_firewall_bridge_ovs = sub {
 my $cleanup_firewall_bridge = sub {
     my ($iface) = @_;
 
-    my ($vmid, $devid) = &$parse_tap_devive_name($iface);
+    my ($vmid, $devid) = &$parse_tap_devive_name($iface, 1);
+    return if !defined($vmid);  
     my ($fwbr, $vethfw, $vethfwpeer, $ovsintport) = &$compute_fwbr_names($vmid, $devid);
 
     # cleanup old port config from any openvswitch bridge


> -----Original Message-----
> From: pve-devel [mailto:pve-devel-bounces at pve.proxmox.com] On Behalf Of
> Alexandre Derumier
> Sent: Freitag, 16. Mai 2014 09:44
> To: pve-devel at pve.proxmox.com
> Subject: [pve-devel] [PATCH] allow random openvz interface name for non
> firewalled interface




More information about the pve-devel mailing list