Page MenuHomeVyOS Platform

compare fails for paths containing CIDR notation (/ encoded to %2F)
Open, NormalPublicBUG

Description

The compare command fails when executed in configuration mode for a path that contains a CIDR address (e.g., 10.0.0.0/24). The system incorrectly URL-encodes the separating slash (/) to %2F, causing the configuration comparison logic to look for a non-existent path and return a "Path doesn't exist" error.

vyos@vyos# edit  service dhcp-server shared-network-name LAN_br1
[edit service dhcp-server shared-network-name LAN_br1]
vyos@vyos# compare
No changes between working and active configurations.

[edit service dhcp-server shared-network-name LAN_br1]

vyos@vyos# edit  service dhcp-server shared-network-name LAN_br1 subnet 10.0.0.0/24
[edit service dhcp-server shared-network-name LAN_br1 subnet 10.0.0.0/24]
vyos@vyos# compare
Path ['service', 'dhcp-server', 'shared-network-name', 'LAN_br1', 'subnet', '10.0.0.0%2F24'] doesn't exist
[edit service dhcp-server shared-network-name LAN_br1 subnet 10.0.0.0/24]

Details

Version
2025.08.05-0021-rolling
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)