Page MenuHomeVyOS Platform

Route loading error if with custom device name
Open, NormalPublicBUG

Description

Update:

The issue name was Route loading error if with device created from container.

A new test, I read include/constraint/interface-name.xml.i, see there is a regex for interface names, so I rename the clash container created interface to tun0 which matches the regex, no error.

Breifly, if I create a interface by other program/container, not matching the regex which is for now
<regex>(bond|br|dum|en|ersp|eth|gnv|ifb|ipoe|lan|l2tp|l2tpeth|macsec|peth|ppp|pppoe|pptp|sstp|sstpc|tun|veth|vti|vtun|vxlan|wg|wlan|wwan)[0-9]+(.\d+)?|pod-[-_a-zA-Z0-9]{1,11}|lo</regex>

and I put the interface in protocol static, the whole protocol static will not be loaded on boot.

Start up message

vyos-rt vyos-config[971]: Configuration error

configure command message

WARNING: There was a config error on boot: saving the configuration now could overwrite data.
You may want to check and reload the boot config

load & compare

+ static {
+     route 192.168.24.0/24 {
+         next-hop 192.168.1.1 {
+         }
+     }
+     route 192.168.51.0/24 {
+         interface wg1 {
+         }
+     }
+     route 198.18.0.0/15 {
+         interface utun0 {
+             disable
+         }
+     }
+     table 18 {
+         route 0.0.0.0/0 {
+             interface utun0 {
+                 disable
+             }
+             next-hop 198.18.0.1 {
+                 disable
+                 interface "utun0"
+             }
+         }
+     }
+ }

commit & save works.

utun0 is the clash TUN interface created from container.

I remove & test entry by entry, if I don't use the interface utun0, everyting works fine.

If I add utun0, like

interface utun0 or next-hop 198.18.0.1 interface utun0

both in protocol static route and prototcol static table route

disabled or not disabled

error occurs on boot, but can be load & commit.

Lucky thing for me is my route works if not with interface utun0.

Extra test:

To test if this occurs on any interface not defined in config tree:

I try set protocol static route 192.168.0.0/24 interface wg9 and reboot. No error.

I try with utun1, also not defined, error Incorrect path /sys/class/net/utun1: no such file or directory after commit.

I grep utun0 /var/log -r found no error at all.

Details

Version
2025.03.13, 2025.03.15
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

sskaje updated the task description. (Show Details)

A new test, I read include/constraint/interface-name.xml.i, see there is a regex for interface names, so I rename the clash container created interface to tun0 which matches the regex, no error.

sskaje renamed this task from Route loading error if with device created from container to Route loading error if with custom device name.Sun, Mar 16, 12:36 PM
sskaje updated the task description. (Show Details)
dmbaturin triaged this task as Normal priority.Mon, Mar 17, 2:18 PM
dmbaturin changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.