Page MenuHomeVyOS Platform

Disallow non alpha-numeric characters in VRF names
Closed, ResolvedPublicBUG

Description

image.png (762×1 px, 125 KB)

I hardly wonder what everything will break with a VRF name that contains non alpha numeric characters.

The linux Kernel only allows for interface names: https://android.googlesource.com/kernel/common/+/caf586e5f23cebb2a68cbaf288d59dbbf2d74052/net/core/dev.c#837

cpo@LR1.wue3# set vrf name MGM>T table 1000
[edit]
cpo@LR1.wue3# commit
[ vrf ]
Traceback (most recent call last):
  File "/usr/libexec/vyos/services/vyos-configd", line 157, in run_script
    script.apply(c)
  File "/usr/libexec/vyos/conf_mode/vrf.py", line 317, in apply
    vrf_if.add_addr('127.0.0.1/8')
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 1294, in add_addr
    elif not is_intf_addr_assigned(self.ifname, addr, netns=netns):
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/utils/network.py", line 444, in is_intf_addr_assigned
    json_out = json.loads(out)
               ^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

[[vrf]] failed
Commit failed

Details

Version
1.4.4
Is it a breaking change?
Stricter validation
Issue type
Bug (incorrect behavior)

Event Timeline

c-po changed the task status from Open to In progress.
c-po claimed this task.
c-po triaged this task as Normal priority.
Viacheslav moved this task from Need Triage to Completed on the VyOS Rolling board.
dmbaturin renamed this task from vrf: disallow non alpha-numeric characters to Disallow non alpha-numeric characters in VRF names.Mar 18 2026, 2:33 PM
dmbaturin changed Is it a breaking change? from Unspecified (possibly destroys the router) to Stricter validation.