Page MenuHomeVyOS Platform

Interface description can't contain a colon
Closed, ResolvedPublicBUG

Description

When setting an interface description (e.g. set interfaces ethernet eth9 vif 2510 description "Transit: ISP (AS65000)"), system crashes on commit:

# commit
[ interfaces ethernet eth9 ]
Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 446, in <module>
    c = get_config()
  File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 134, in get_config
    if not conf.exists(cfg_base):
  File "/usr/lib/python3/dist-packages/vyos/config.py", line 194, in exists
    path = re.split(r'\s+', path)
  File "/usr/lib/python3.7/re.py", line 213, in split
    return _compile(pattern, flags).split(string, maxsplit)
TypeError: expected string or bytes-like object

[[interfaces ethernet eth9]] failed

Details

Difficulty level
Unknown (require assessment)
Version
1.3-rolling-201911090242
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

c-po added a subscriber: c-po.

Colons in interface description should be allowed. There are tools like libreNMS which use defined prefixes for internal mapping and they have a colon inside.

c-po triaged this task as High priority.

In the latest VyOS 1.3-rolling-201912261106 all work fine.

[email protected]# set interfaces ethernet eth1 description "Transit: ISP (AS65000)"
[edit]
[email protected]# commit
[edit]
[email protected]# run show interfaces 
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
eth0             192.168.122.172/24                u/u  
eth1             fd12:3456:789a:1::9992/128        u/u  Transit: ISP (AS65000)

I guess it has been auto-fixed by https://github.com/vyos/vyos-1x/commit/85349b54ab4de42f81d4c8c4dc84901d1313025f

vyos@vyos# set interfaces ethernet eth1 vif 2510 description "Transit: ISP (AS65000)"
vyos@vyos# set interfaces ethernet eth2  description "Transit: ISP (AS65000)"
vyos@vyos# commit
vyos@vyos# run show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
eth0             -                                 u/u
eth1             -                                 u/D
eth1.2510        -                                 u/D  Transit: ISP (AS65000)
eth2             -                                 u/D  Transit: ISP (AS65000)
c-po moved this task from Need Triage to Finished on the VyOS 1.3 Equuleus board.
erkin set Issue type to Bug (incorrect behavior).Aug 31 2021, 6:20 PM