Remove VLAN 0.

This commit is contained in:
Nicolo Maio 2023-11-13 16:50:59 +01:00
parent 672539ac9f
commit bb4bd92eac
2 changed files with 8 additions and 4 deletions

View file

@ -511,14 +511,18 @@ end
-- ##############################################
function getFullVlanName(vlan_id, compact)
function getFullVlanName(vlan_id, compact, return_untagged)
local alias = getVlanAlias(vlan_id)
-- In case of vlan 0, return empty string as name
-- fix for untagged vlan (#7998)
if tonumber(vlan_id) == 0 then
if (isEmptyString(alias)) then
return i18n('no_vlan')
if (isEmptyString(alias) or alias == '0') then
if (return_untagged) then
return i18n('no_vlan')
end
return ''
else
if (compact) then
alias = shortenString(alias)