mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 08:34:39 +00:00
dhcp: do not advertise link-local VIPs
Since 2b7beb78b3804f6 it's possible to operate link-local addresses in virtual IPs, but now these get picked up by radvd and that should not be the case. Reported by: @bimbar
This commit is contained in:
parent
f1a7b93209
commit
6970f4c4af
@ -316,10 +316,12 @@ function dhcpd_radvd_configure($verbose = false, $blacklist = array())
|
||||
}
|
||||
|
||||
foreach (config_read_array('virtualip', 'vip') as $vip) {
|
||||
if ($vip['interface'] == $dhcpv6if && is_ipaddrv6($vip['subnet'])) {
|
||||
$subnetv6 = gen_subnetv6($vip['subnet'], $vip['subnet_bits']);
|
||||
$stanzas[] = "{$subnetv6}/{$vip['subnet_bits']}";
|
||||
if ($vip['interface'] != $dhcpv6if || !is_ipaddrv6($vip['subnet']) || is_linklocal($vip['subnet'])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$subnetv6 = gen_subnetv6($vip['subnet'], $vip['subnet_bits']);
|
||||
$stanzas[] = "{$subnetv6}/{$vip['subnet_bits']}";
|
||||
}
|
||||
|
||||
/* VIPs may duplicate readings from system */
|
||||
@ -505,7 +507,7 @@ function dhcpd_radvd_configure($verbose = false, $blacklist = array())
|
||||
}
|
||||
|
||||
foreach (config_read_array('virtualip', 'vip') as $vip) {
|
||||
if ($vip['interface'] != $if || !is_ipaddrv6($vip['subnet'])) {
|
||||
if ($vip['interface'] != $if || !is_ipaddrv6($vip['subnet']) || is_linklocal($vip['subnet'])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user