[pve-devel] [PATCH 1/3] improve tap_unplug
Dietmar Maurer
dietmar at proxmox.com
Wed May 7 13:57:47 CEST 2014
I do not understand this patch - questions inline:
> Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
> ---
> data/PVE/Network.pm | 57
> +++++++++++++++++++++++++++++++++++++++++++--------
> 1 file changed, 49 insertions(+), 8 deletions(-)
>
> diff --git a/data/PVE/Network.pm b/data/PVE/Network.pm index
> 4677bf9..fa56c8b 100644
> --- a/data/PVE/Network.pm
> +++ b/data/PVE/Network.pm
> @@ -88,17 +88,19 @@ sub tap_plug {
> }
>
> sub tap_unplug {
> - my ($iface, $bridge, $tag) = @_;> -
> - if (-d "/sys/class/net/$bridge/bridge") {
> - $bridge .= "v$tag" if $tag;
> + my ($iface, $bridge, $tag, $tapfirewall) = @_;
Why do we need this additional parameter $tapfirewall? I can't see where you use it?
> + my $path= "/sys/class/net/$iface/brport/bridge";
> + if (-l $path) {
> + $bridge = basename(readlink($path));
Now you overwrite the $bridge parameter. If we do not need that parameter, it is maybe better
to remove it from the method signature completely? Parameter $tag is also unused?
So maybe this should be something like:
sub tap_unplug {
my ($iface) = @_;
....
More information about the pve-devel
mailing list