fix vlan assignment generation

This commit is contained in:
Samuel Lorch 2023-04-08 14:45:22 +02:00
parent a290d06803
commit d6c58b7d21

View file

@ -135,8 +135,10 @@ func GenerateNetworkdConfiguration(conf definitions.Config) ([]NetworkdConfigFil
if inter.Type != definitions.Vlan {
vlans := []string{}
for vlanName, vlanInter := range conf.Network.Interfaces {
if inter.Type == definitions.Vlan && *vlanInter.VlanParent == name {
vlans = append(vlans, vlanName)
if vlanInter.Type == definitions.Vlan {
if *vlanInter.VlanParent == name {
vlans = append(vlans, vlanName)
}
}
}