Skip to content

Commit

Permalink
Merge pull request #14 from G-PORTAL/handle-inplict-vlan-for-fsos
Browse files Browse the repository at this point in the history
FSOS: Properly handle setting the default native vlan
  • Loading branch information
msniveau authored Oct 11, 2023
2 parents 0417ffc + e80c7b9 commit 6496d8f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/vendors/fsos/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ func (fs *FSOS) ConfigureInterface(update *models.UpdateInterface) (bool, error)
commands = append(commands, fmt.Sprintf("description %s", *update.Description)) // set interface description
}

if update.UntaggedVLAN != nil {
if update.UntaggedVLAN != nil && *update.UntaggedVLAN != 1 {
commands = append(commands, fmt.Sprintf("switchport trunk native vlan %d", *update.UntaggedVLAN)) // set untagged vlan
} else if update.UntaggedVLAN != nil && *update.UntaggedVLAN == 1 {
commands = append(commands, "no switchport trunk native vlan")
}

if update.TaggedVLANs != nil {
Expand Down

0 comments on commit 6496d8f

Please sign in to comment.