Project

General

Profile

Actions

Bug #16870

open

OPT interfaces with "Track Interface" IPv6 not included in dhcp6c.conf on boot

Added by Marcelo Altmann 1 day ago. Updated 1 day ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
IPv6 Router Advertisements (radvd/rtsold)
Target version:
-
Start date:
Due date:
% Done:

0%

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

Description

Environment:

pfSense CE 2.8.1-RELEASE
WAN: PPPoE with DHCPv6 prefix delegation (/56)
LAN (igc1): Track Interface, Prefix ID 0 — working
OPT1/DIRECT (igc2): Track Interface, Prefix ID 1 — not working after boot

Bug description:

When pfSense boots, OPT interfaces configured with "Track Interface" for IPv6 are not included in /var/etc/dhcp6c.conf , even though the configuration in config.xml is correct.
The config.xml for OPT1 correctly contains:

<ipaddrv6>track6</ipaddrv6>
<track6-interface>wan</track6-interface>
<track6-prefix-id>1</track6-prefix-id>

However, the generated dhcp6c.conf only includes the LAN interface:

prefix-interface igc1 {
    sla-id 0;
    sla-len 8;
};

OPT1 (igc2) is missing entirely.

Root cause analysis:

The function interface_dhcpv6_configure() is triggered when the WAN comes up during boot. It calls link_interface_to_track6() to build the list of interfaces to include in dhcp6c.conf. This function iterates over all interfaces and checks:

if (!empty($ifcfg['ipaddrv6']) && $ifcfg['track6-interface'] == $int)

The likely cause is a race condition: OPT interfaces are not fully initialized when the WAN comes up, so they are either not yet present or not passing the condition at that moment. The LAN interface works because it is initialized earlier in the boot sequence.

Workaround:
Manually calling interface_dhcpv6_configure() via PHP after boot resolves the issue:

php -r "require_once('interfaces.inc'); interface_dhcpv6_configure('wan', config_get_path('interfaces/wan'));" 

After running this and restarting dhcp6c, the dhcp6c.conf correctly includes both interfaces and OPT1 receives its IPv6 prefix from the delegated /56 block.

Expected behavior:

All interfaces configured with "Track Interface" and a valid track6-prefix-id should be included in dhcp6c.conf regardless of boot order.

Suggested fix:

Defer the generation of dhcp6c.conf until all interfaces are initialized, or add a post-boot hook that regenerates it if any Track Interface interfaces are missing.

Actions #1

Updated by Steve Wheeler 1 day ago

I can't replicate that. Is igc2 not linked at boot at all in your setup?

Actions #2

Updated by Marcelo Altmann 1 day ago

After a full reboot, dhcp6c.conf was generated correctly with both igc1 and igc2, and both interfaces received their IPv6 prefixes. The issue appears to occur when a new interface is configured with "Track Interface" on a running system — dhcp6c.conf is not regenerated automatically after saving the interface configuration. A reboot fixes it. The expected behavior would be for pfSense to restart dhcp6c with an updated conf whenever a tracked interface is added or modified.

Actions

Also available in: Atom PDF