mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Fixes #2495. On trigering of rc.newwanip remove all ipaliases from the interface since they will be readded later on. This will also make sure to have the correct address order
This commit is contained in:
parent
5fb149ba4b
commit
b877d6351c
@ -1964,6 +1964,21 @@ function interface_proxyarp_configure($interface = "") {
|
||||
}
|
||||
}
|
||||
|
||||
function interface_ipalias_cleanup($interface, $inet = "inet4") {
|
||||
global $g, $config;
|
||||
|
||||
if (is_array($config['virtualip']['vip'])) {
|
||||
foreach ($config['virtualip']['vip'] as $vip) {
|
||||
if ($vip['mode'] == "ipalias" && $vip['interface'] == $interface) {
|
||||
if ($inet == "inet6" && is_ipaddrv6($vip['subnet']))
|
||||
interface_vip_bring_down($vip);
|
||||
else if ($inet == "inet4" && is_ipaddrv4($vip['subnet']))
|
||||
interface_vip_bring_down($vip);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function interfaces_vips_configure($interface = "") {
|
||||
global $g, $config;
|
||||
if(isset($config['system']['developerspew'])) {
|
||||
|
||||
@ -97,6 +97,7 @@ system_resolvconf_generate(true);
|
||||
/* write current WAN IP to file */
|
||||
file_put_contents("{$g['vardb_path']}/{$interface}_ip", $curwanip);
|
||||
|
||||
interface_ipalias_cleanup($interface, "inet4");
|
||||
link_interface_to_vips($interface, "update");
|
||||
|
||||
unset($gre);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user