Page MenuHomeVyOS Platform

router-advert: name-server-lifetime 0 documented but rejected by CLI validator (range 1-7200)
Closed, ResolvedPublicBUG

Description

Summary

set service router-advert interface <if> name-server-lifetime 0 is documented as valid ("Name-servers should no longer be used") but the CLI syntax:expression only allows 1–7200, so the set fails.

Conf-mode Python already treats 0 correctly (it only enforces MaxRtrAdvInterval checks when lifetime > 0). Only the CLI validator / node.def is wrong.

RFC 8106 / radvd: RDNSS lifetime 0 means resolvers must no longer be used. That is useful when withdrawing RDNSS from RAs so dual-stack clients drop a recursive resolver without waiting for the previous lifetime to expire.

Related feature (not this bug): T4477 (router-advert: support RDNSS lifetime option).

Version

  • Image: 2026.07.10-1446-rolling
  • build_git: 5e2e9a3375a0ec
  • Platform: amd64

Reproduction

configure set service router-advert interface eth1 name-server 2606:4700:4700::1111 set service router-advert interface eth1 name-server-lifetime 0 commit

Same failure via HTTPS /configure API:

{"op":"set","path":["service","router-advert","interface","eth1","name-server-lifetime"],"value":"0"}

Actual result

Number is not in any of allowed ranges

Maximum interval must be between 1 and 7200 seconds Value validation failed Set failed

Expected result

Commit succeeds and generated radvd.conf uses AdvRDNSSLifetime 0 (or equivalent) so clients stop using the advertised RDNSS.

Root cause

Live template:

/opt/vyatta/share/vyatta-cfg/templates/service/router-advert/interface/node.tag/name-server-lifetime/node.def

type: txt help: Maximum duration how long the RDNSS entries are used val_help: u32:0; Name-servers should no longer be used val_help: u32:1-7200; Maximum interval in seconds syntax:expression: exec "vyosₗibexec_dir/validate−value −−exec "{vyos_validators_dir}/numeric --range 1-7200\" --value \'$VAR(@)\'"; "Maximum interval must be between 1 and 7200 seconds"

  • val_help advertises 0
  • syntax:expression only allows 1-7200

Conf-mode already allows 0 (service_router-advert.py):

lifetime = int(interface_config['name_server_lifetime']) if lifetime > 0:

if lifetime < int(interval_max):
    raise ConfigError(...)

Fixing the interface-definition / node.def validator should be sufficient for CLI and API accept; generate/apply already understand 0.

Suggested fix

Allow 0 in the syntax validator, for example:

  • include 0 via validate-value regex, or
  • use numeric range 0-7200 if that matches project conventions

Add a smoke-test case: name-server-lifetime 0 commits and appears in generated radvd.conf.

Workaround

Delete name-server from the RA instead of setting lifetime 0. Clients then keep using any remaining RDNSS lifetime until it expires, or fall back to other resolvers (e.g. DHCPv4). There is currently no way to actively signal "stop using this RDNSS now" via lifetime 0.

Details

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