radvd: When Base6Interface constructor is used, use its primary address for ifcfgipv6 (#9689)

This commit is contained in:
Monviech 2026-02-01 13:23:36 +01:00 committed by GitHub
parent 1727592311
commit 3bcdae70f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -149,8 +149,16 @@ function radvd_configure_do($verbose = false, $ignorelist = [])
$carp_mode = false;
$src_addr = false;
$ifcfgipv6 = null;
if (!$entry->AdvRASrcAddress->isEmpty()) {
$ifcfgipv6 = $entry->AdvRASrcAddress->getValue();
} elseif (!$entry->Base6Interface->isEmpty()) {
$ifcfgipv6 = get_interface_ipv6($entry->Base6Interface->getValue());
} else {
$ifcfgipv6 = get_interface_ipv6($dhcpv6if);
}
$ifcfgipv6 = !$entry->AdvRASrcAddress->isEmpty() ? $entry->AdvRASrcAddress->getValue() : get_interface_ipv6($dhcpv6if);
if (!is_ipaddrv6($ifcfgipv6)) {
$radvdconf .= "# Skipping addressless interface {$dhcpv6if}\n";
continue;