]> git.proxmox.com Git - pve-common.git/commitdiff
network : add tap_unplug
authorAlexandre Derumier <aderumier@odiso.com>
Tue, 5 Mar 2013 09:23:47 +0000 (10:23 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 5 Mar 2013 11:03:52 +0000 (12:03 +0100)
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
data/PVE/Network.pm

index a7e55d71d123ce4af44b164dda008cec6512f9a1..8f82686a8febf3c4493e1270403c1027fb76f75e 100644 (file)
@@ -74,6 +74,15 @@ sub tap_plug {
        die "can't add interface to bridge\n";
 }
 
+sub tap_unplug {
+    my ($iface, $bridge, $tag) = @_;
+
+    $bridge .= "v$tag" if $tag;
+
+    system ("/usr/sbin/brctl delif $bridge $iface") == 0 ||
+       die "can't del interface from bridge\n";
+}
+
 sub copy_bridge_config {
     my ($br0, $br1) = @_;