Page MenuHomeVyOS Platform

router-advert: invalid nat64prefix length raises TypeError instead of a config error
In progress, LowPublicBUG

Description

When a nat64prefix with an unsupported prefix length is set, verify() in src/conf_mode/service_router-advert.py tries to build the error text with ', /'.join(nat64_supported_lengths). The list holds integers, so join() raises a TypeError and the user sees a Python traceback instead of the intended message.

Steps to reproduce

set service router-advert interface eth1 nat64prefix 64:ff9b::/50
commit

Result

TypeError: sequence item 0: expected str instance, int found

Expected

Invalid NAT64 prefix length for "64:ff9b::/50", can only be one of: /32, /40, /48, /56, /64, /96

The existing smoketest only checks that the commit fails, so it does not notice the wrong exception.

I have a fix and a tightened smoketest and will open a PR.

Details

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

Event Timeline

Viacheslav changed the task status from Open to In progress.Mon, Nov 30, 12:03 PM
Viacheslav assigned this task to jamesperu.
Viacheslav changed the subtype of this task from "Task" to "Bug".