mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
interfaces: experiment on SLAAC avoidance for #5630
This commit is contained in:
parent
c48b126ece
commit
9d2ee6178b
@ -4059,6 +4059,7 @@ function interfaces_addresses($interfaces, $as_subnet = false, $ifconfig_details
|
||||
$result[$key] = [
|
||||
'address' => $address['ipaddr'],
|
||||
'alias' => false,
|
||||
'autoconf' => !empty($address['autoconf']),
|
||||
'bind' => true,
|
||||
'bits' => $address['subnetbits'],
|
||||
'deprecated' => !empty($address['deprecated']),
|
||||
@ -4175,6 +4176,7 @@ function _interfaces_primary_address6($interface, $ifconfig_details = null, $all
|
||||
}
|
||||
|
||||
foreach (interfaces_addresses($interface, false, $ifconfig_details) as $addr) {
|
||||
/* XXX consider excluding 'autoconf', but only when it's not in SLAAC mode */
|
||||
if ($addr['family'] != 'inet6' || $addr['deprecated'] || $addr['detached'] || $addr['tentative'] || $addr['alias']) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -105,6 +105,8 @@ switch ($config['interfaces'][$interface]['ipaddrv6'] ?? 'none') {
|
||||
plugins_configure('dhcp', false, ['inet6']);
|
||||
break;
|
||||
default:
|
||||
/* flush SLAAC addressing in order to make any of our own addresses preferred */
|
||||
shell_safe('/usr/local/sbin/ifctl -i %s -f', $realif);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user