mirror of
https://git.proxmox.com/git/pve-common
synced 2025-07-12 10:23:39 +00:00
network : add tap_plug
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
parent
3aa99c7006
commit
f0c190eebe
@ -64,6 +64,16 @@ sub tap_create {
|
||||
die "interface activation failed\n" if $@;
|
||||
}
|
||||
|
||||
sub tap_plug {
|
||||
my ($iface, $bridge, $tag) = @_;
|
||||
|
||||
my $newbridge = activate_bridge_vlan($bridge, $tag);
|
||||
copy_bridge_config($bridge, $newbridge) if $bridge ne $newbridge;
|
||||
|
||||
system ("/usr/sbin/brctl addif $newbridge $iface") == 0 ||
|
||||
die "can't add interface to bridge\n";
|
||||
}
|
||||
|
||||
sub copy_bridge_config {
|
||||
my ($br0, $br1) = @_;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user