applied a slightly modified version and adapted a test case for it

On Tue, Aug 28, 2018 at 01:31:53PM +0200, Alexandre Derumier wrote:
> We can add to a bridge a non defined vlan interface.
> We only need to check that physical interface exist
> 
> example
> -------
> auto eno1
> iface eno1 inet manual
> 
> auto vmbr0
> iface vmbr0 inet manual
>       bridge_ports eno1.1
> ---
>  src/PVE/INotify.pm | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm
> index 6892b4c..4cf8699 100644
> --- a/src/PVE/INotify.pm
> +++ b/src/PVE/INotify.pm
> @@ -1404,6 +1404,7 @@ sub __write_etc_network_interfaces {
>       my $d = $ifaces->{$iface};
>       if ($d->{type} eq 'bridge') {
>           foreach my $p (split (/\s+/, $d->{bridge_ports})) {
> +             $p = $1 if ($p =~ m/^(\S+)\.\d+$/);
>               my $n = $ifaces->{$p};
>               die "bridge '$iface' - unable to find bridge port '$p'\n"
>                   if !$n;
> -- 
> 2.11.0

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to