diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index 32d5850ca..5b3b9ee98 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -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; + } } }