[pve-devel] [PATCH] read|write network interfaces : add support for vlan bridge|interface

Daniel Hunsaker danhunsaker at gmail.com
Tue Sep 22 05:21:39 CEST 2015


Doesn't affect functionality, but curious if there's a reason these weren't
added in the same order both times...

On Mon, Sep 21, 2015, 20:52 Alexandre Derumier <aderumier at odiso.com> wrote:

> Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
> ---
>  src/PVE/INotify.pm | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm
> index 22f01d1..61faa70 100644
> --- a/src/PVE/INotify.pm
> +++ b/src/PVE/INotify.pm
> @@ -971,6 +971,10 @@ sub __read_etc_network_interfaces {
>             } else {
>                 $d->{type} = 'unknown';
>             }
> +       } elsif ($iface =~ m/^(eth|bond)\d+.\d+$/) {
> +               $d->{type} = 'interface_vlan';
> +       } elsif ($iface =~ m/^vmbr\d+.\d+$/) {
> +               $d->{type} = 'bridge_vlan';
>         } elsif ($iface =~ m/^lo$/) {
>             $d->{type} = 'loopback';
>         } else {
> @@ -1285,7 +1289,9 @@ NETWORKDOC
>         loopback => 100000,
>         eth => 200000,
>         bond => 300000,
> +       interface_vlan => 350000,
>         bridge => 400000,
> +       bridge_vlan => 500000,
>     };
>
>      my $lookup_type_prio = sub {
> @@ -1306,6 +1312,10 @@ NETWORKDOC
>             $pri = $if_type_hash->{bond} + $alias;
>         } elsif ($iface =~ m/^vmbr\d+$/) {
>             $pri = $if_type_hash->{bridge} + $alias;
> +       } elsif ($iface =~ m/^vmbr\d+.\d+$/) {
> +           $pri = $if_type_hash->{bridge_vlan} + $alias;
> +       } elsif ($iface =~ m/^(eth|bond)\d+.\d+$/) {
> +           $pri = $if_type_hash->{interface_vlan} + $alias;
>         }
>
>         return $pri || ($if_type_hash->{unknown} + $alias);
> --
> 2.1.4
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.proxmox.com/pipermail/pve-devel/attachments/20150922/e155b9b9/attachment.htm>


More information about the pve-devel mailing list