projects
/
pve-common.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f0c190e
)
network : add tap_unplug
author
Alexandre Derumier
<aderumier@odiso.com>
Tue, 5 Mar 2013 09:23:47 +0000
(10:23 +0100)
committer
Dietmar 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
patch
|
blob
|
blame
|
history
diff --git
a/data/PVE/Network.pm
b/data/PVE/Network.pm
index a7e55d71d123ce4af44b164dda008cec6512f9a1..8f82686a8febf3c4493e1270403c1027fb76f75e 100644
(file)
--- 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";
}
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) = @_;
sub copy_bridge_config {
my ($br0, $br1) = @_;