Project

General

Profile

Actions

Bug #13927

open

Cannot set AdvDefaultLifetime aka "Router lifetime"

Added by Jan L. over 3 years ago. Updated 3 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
DHCP (IPv6)
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Default
Affected Version:
Affected Architecture:

Description

Typically, setting AdvDefaultLifetime to 0 means that a router cannot be used as a default router.
(c.f. https://linux.die.net/man/5/radvd.conf)

Is:
  • pfsense 2.6.0-RELEASE (amd64) requires a strictly positive integer for "Router lifetime"
Should:
  • Assuming that "Router lifetime" maps to AdvDefaultLifetime, 0 should be accepted.
  • Or: It should be possible to specifiy that radv do not include a default route.
Actions #1

Updated by Dale H 3 days ago

Confirming this issue still exists.

Per RFC 4861 ยง4.2, a Router Lifetime of 0 indicates the router should not be considered a default router, while still allowing it to advertise prefixes and RDNSS options. This is the correct configuration for networks using ULA-only addressing with SLAAC where no IPv6 default route should be installed on clients.

The GUI at Services โ†’ Router Advertisements rejects a value of 0 for "Router lifetime" with the HTML5 validation popup: "Please select a value that is no less than 1."

This looks to be a regression. It was previously resolved in Bug #7502, which was addressed in 2.4.3 by allowing min=0 on this field.

The regression was likely introduced by Bug #12439 (https://github.com/pfsense/pfsense/commit/7cf69c985d73), which added blanket input validation (min=1) to all RA lifetime fields without accounting for the fact that Router Lifetime (AdvDefaultLifetime) specifically permits 0.

Workaround: edit the config XML directly to set <raadvdefaultlifetime>0</raadvdefaultlifetime> โ€” the backend radvd config generation implicitly handles 0. Avoid re-saving via the RA GUI page afterward.

Suggested fix - in services_router_advertisements.php

  • Change the HTML input's min from 1 to 0 for the raadvdefaultlifetime field
  • Modify the PHP validation to explicitly handle 0 โ€” change the guard to use isset(), and allow < 0 as the lower bound

Related: #7502 (original fix), #12439 (introduced regression)

Actions

Also available in: Atom PDF