[pve-devel] [PATCH] pve-common: PVE/Network: rework of activate_bridge_vlan
Dietmar Maurer
dietmar at proxmox.com
Sat Jan 26 09:02:55 CET 2013
> -----Original Message-----
> From: pve-devel-bounces at pve.proxmox.com [mailto:pve-devel-
> bounces at pve.proxmox.com] On Behalf Of Stefan Priebe
> Sent: Freitag, 25. Jänner 2013 22:16
> To: pve-devel at pve.proxmox.com
> Subject: [pve-devel] [PATCH] pve-common: PVE/Network: rework of
> activate_bridge_vlan
>
> - use ip command instead of old vconfig
> - activate gvrp by default (it doesn't harm if the switch does not support it or
> it is disabled)
> - use bridge instead of raw ethernet device as vlan bridge
>
> Signed-off-by: Stefan Priebe <s.priebe at profihost.ag>
> ---
> data/PVE/Network.pm | 22 ++++------------------
> 1 file changed, 4 insertions(+), 18 deletions(-)
>
> diff --git a/data/PVE/Network.pm b/data/PVE/Network.pm index
> 2c356eb..71045fe 100644
> --- a/data/PVE/Network.pm
> +++ b/data/PVE/Network.pm
> @@ -72,28 +72,14 @@ sub activate_bridge_vlan {
> die "got strange vlan tag '$tag_param'\n" if $tag < 1 || $tag > 4094;
>
> my $bridgevlan = "${bridge}v$tag";
> -
> - my $dir = "/sys/class/net/$bridge/brif";
> -
> - #check if we have an only one ethX or bondX interface in the bridge
> -
> - my $iface;
> - PVE::Tools::dir_glob_foreach($dir, '((eth|bond)\d+)', sub {
> - my ($slave) = @_;
> -
> - die "more then one physical interfaces on bridge '$bridge'\n" if
> $iface;
> - $iface = $slave;
> -
> - });
> -
> - die "no physical interface on bridge '$bridge'\n" if !$iface;
> -
> + my $iface = $bridge;
Why do you remove those checks (any why do we have that check)?
More information about the pve-devel
mailing list