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/?p=pve-common.git;a=commitdiff_plain;h=a84b65c0da5eb1c1e3a3d4c51f01e24aa577253e 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) = @_;