Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] PortAdmin forces configuration of native vlan on trunks #2787

Open
lunkwill42 opened this issue Dec 13, 2023 · 0 comments
Open

[BUG] PortAdmin forces configuration of native vlan on trunks #2787

lunkwill42 opened this issue Dec 13, 2023 · 0 comments
Labels

Comments

@lunkwill42
Copy link
Member

Describe the bug

Some switch platforms (JunOS is one) allow trunk ports to not have a native VLAN configured. However, PortAdmin seems to force a native vlan to always be configured. This likely stems from PortAdmin originally being developed and tested on networks that were very Cisco-oriented, where Cisco switches would always default to VLAN 1 as the native VLAN for a trunk if left unset.

Here is one of potentially multiple places in the code that need to be inspected. This line defaults the native vlan value to 1 if left out of the trunk configuration POST request:

native_vlan = int(request.POST.get('native_vlan', 1))

Expected behavior

PortAdmin should not force a native vlan setting on platforms where such a value can "legally" be omitted.

Environment (please complete the following information):

  • NAV version installed: 5.8.3

Additional context

Care should be taken that changing this behavior doesn't disrupt existing behavior for platforms like Cisco and HP.

This was discovered when testing a fix for #2477

@lunkwill42 lunkwill42 added the bug label Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant