We shouldn't mix different tool sets on the one hand, and on
the other hand net-tools is an optional package in stretch
and there's no real need for us to depend on it.
---
 src/PVE/Network.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/PVE/Network.pm b/src/PVE/Network.pm
index 27492b5..69051b9 100644
--- a/src/PVE/Network.pm
+++ b/src/PVE/Network.pm
@@ -245,7 +245,7 @@ sub tap_create {
 
     eval { 
        disable_ipv6($iface);
-       PVE::Tools::run_command("/sbin/ifconfig $iface 0.0.0.0 promisc up mtu 
$bridgemtu");
+       PVE::Tools::run_command(['/sbin/ip', 'link', 'set', $iface, 'up', 
'promisc', 'on', 'mtu', $bridgemtu]);
     };
     die "interface activation failed\n" if $@;
 }
@@ -317,7 +317,7 @@ my $create_firewall_bridge_ovs = sub {
     &$activate_interface($ovsintport);
 
     # set the same mtu for ovs int port
-    PVE::Tools::run_command("/sbin/ifconfig $ovsintport mtu $bridgemtu");
+    PVE::Tools::run_command(['/sbin/ip', 'link', 'set', $ovsintport, 'mtu', 
$bridgemtu]);
     
     &$bridge_add_interface($fwbr, $ovsintport);
 };
-- 
2.1.4


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

Reply via email to