interfaces: improve naming #4749

This commit is contained in:
Franco Fichtner 2021-09-15 15:07:59 +02:00
parent 8ef7cac570
commit 56467eb82e
5 changed files with 5 additions and 5 deletions

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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];

View File

@ -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']);

View File

@ -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: