mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 01:24:38 +00:00
interfaces: improve naming #4749
This commit is contained in:
parent
8ef7cac570
commit
56467eb82e
@ -4648,7 +4648,7 @@ function interfaces_primary_address6($interface, $realif = null, $ifconfig_detai
|
||||
return [ $ifcfgipv6, $networkv6, $subnetbitsv6 ];
|
||||
}
|
||||
|
||||
function interfaces_linklocal_address6($interface, $realif = null, $ifconfig_details = null)
|
||||
function interfaces_scoped_address6($interface, $realif = null, $ifconfig_details = null)
|
||||
{
|
||||
return interfaces_primary_address6($interface, $realif, $ifconfig_details, true);
|
||||
}
|
||||
|
||||
@ -175,7 +175,7 @@ function dpinger_configure_do($verbose = false, $gwname = null)
|
||||
} elseif ($gateway['ipprotocol'] == "inet6") { // This is an IPv6 gateway...
|
||||
if (is_linklocal($gateway['monitor'])) {
|
||||
/* link local monitor needs a link local address for the "src" part */
|
||||
$gwifip = interfaces_linklocal_address6($gateway['if'], null, $ifconfig_details);
|
||||
$gwifip = interfaces_scoped_address6($gateway['if'], null, $ifconfig_details);
|
||||
} else {
|
||||
$gwifip = interfaces_primary_address6($gateway['if'], null, $ifconfig_details);
|
||||
}
|
||||
|
||||
@ -534,7 +534,7 @@ function unbound_add_host_entries($ifconfig_details = null)
|
||||
$unbound_entries .= "local-data: \"{$config['system']['hostname']} AAAA {$laddr6}\"\n";
|
||||
}
|
||||
if (empty($config['unbound']['noreglladdr6'])) {
|
||||
list ($lladdr6) = interfaces_linklocal_address6($interface, null, $ifconfig_details);
|
||||
list ($lladdr6) = interfaces_scoped_address6($interface, null, $ifconfig_details);
|
||||
if (!empty($lladdr6)) {
|
||||
/* cannot embed scope */
|
||||
$lladdr6 = explode('%', $lladdr6)[0];
|
||||
|
||||
@ -58,7 +58,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
break;
|
||||
case 'ipv6-ll':
|
||||
$command .= '6';
|
||||
list ($ifaddr) = interfaces_linklocal_address6($pconfig['interface']);
|
||||
list ($ifaddr) = interfaces_scoped_address6($pconfig['interface']);
|
||||
break;
|
||||
default:
|
||||
list ($ifaddr) = interfaces_primary_address($pconfig['interface']);
|
||||
|
||||
@ -78,7 +78,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
$nc_args .= ' -6';
|
||||
break;
|
||||
case 'ipv6-ll':
|
||||
list ($ifaddr) = interfaces_linklocal_address6($pconfig['interface']);
|
||||
list ($ifaddr) = interfaces_scoped_address6($pconfig['interface']);
|
||||
$nc_args .= ' -6';
|
||||
break;
|
||||
default:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user