From: Alexandre Derumier Date: Tue, 5 Mar 2013 09:23:47 +0000 (+0100) Subject: network : add tap_unplug X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;ds=sidebyside;h=a84b65c0da5eb1c1e3a3d4c51f01e24aa577253e;hp=f0c190eebe95a72e2ff5ed875060e43e03f68ee4;p=pve-common.git network : add tap_unplug Signed-off-by: Alexandre Derumier --- diff --git a/data/PVE/Network.pm b/data/PVE/Network.pm index a7e55d7..8f82686 100644 --- a/data/PVE/Network.pm +++ b/data/PVE/Network.pm @@ -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) = @_;