diff options
author | Jernej Jakob <jernej.jakob@gmail.com> | 2020-05-01 17:36:47 +0200 |
---|---|---|
committer | Jernej Jakob <jernej.jakob@gmail.com> | 2020-05-04 22:59:39 +0200 |
commit | 109dbf9789bdc0b1e35b2b5ebd2fd0ce2a1ebe4a (patch) | |
tree | f544547cd26531389a5923f67ca5c8ce93cac962 /python/vyos/ifconfig | |
parent | 6369d56ed5bd5a36c4ae3de21e0e316989f0da8e (diff) | |
download | vyos-1x-109dbf9789bdc0b1e35b2b5ebd2fd0ce2a1ebe4a.tar.gz vyos-1x-109dbf9789bdc0b1e35b2b5ebd2fd0ce2a1ebe4a.zip |
ifconfig: T2241: fix section _basename vlan stripping
Previously the function returned the correct basename only for vif interfaces
as it stopped at the 2nd dot. If we had a vif-s vif-c interface 'eth0.1.2' it
would return 'eth0.'. It is now fixed to strip both vif-s and vif-c if
'vlan=True' (default).
Diffstat (limited to 'python/vyos/ifconfig')
-rw-r--r-- | python/vyos/ifconfig/section.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/vyos/ifconfig/section.py b/python/vyos/ifconfig/section.py index 092236fef..2d77c42cc 100644 --- a/python/vyos/ifconfig/section.py +++ b/python/vyos/ifconfig/section.py @@ -54,7 +54,7 @@ class Section: name = name.rstrip('0123456789') name = name.rstrip('.') if vlan: - name = name.rstrip('0123456789') + name = name.rstrip('0123456789.') return name @classmethod |