mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 08:34:39 +00:00
interfaces: work harder to match ifconfig output #5008
This commit is contained in:
parent
89922cc191
commit
735dbfa7f6
@ -4629,12 +4629,15 @@ function interfaces_primary_address6($interface, $realif = null, $ifconfig_detai
|
||||
$addrparts = explode('/', $tmpaddr);
|
||||
|
||||
foreach (config_read_array('virtualip', 'vip') as $vip) {
|
||||
if (
|
||||
$vip['interface'] == $interface && $vip['mode'] == 'ipalias' &&
|
||||
Net_IPv6::compress($vip['subnet']) == $addrparts[0]
|
||||
) {
|
||||
/* do not care about alias */
|
||||
continue 2;
|
||||
if ($vip['interface'] == $interface && $vip['mode'] == 'ipalias' && strpos($vip['subnet'], ':') !== false) {
|
||||
/*
|
||||
* Since we do not know what subnet value was given by user
|
||||
* uncompress/compress to match correctly compressed system
|
||||
* value. Matchig alias cannot be primary address.
|
||||
*/
|
||||
if (Net_IPv6::compress(Net_IPv6::uncompress($vip['subnet'])) == $addrparts[0]) {
|
||||
continue 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user