mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 16:14:40 +00:00
interfaces: another cleanup
This commit is contained in:
parent
a3400ea974
commit
ab3bf029ca
@ -33,7 +33,8 @@ require_once("interfaces.inc");
|
||||
require_once("util.inc");
|
||||
|
||||
$addresses = [];
|
||||
$anyproxyarp = false;
|
||||
$proxyarp = false;
|
||||
|
||||
foreach (legacy_interfaces_details() as $ifname => $ifcnf) {
|
||||
foreach (['ipv4', 'ipv6'] as $proto) {
|
||||
if (!empty($ifcnf[$proto])) {
|
||||
@ -79,7 +80,7 @@ foreach (glob("/tmp/delete_vip_*.todo") as $filename) {
|
||||
legacy_interface_deladdress($addresses[$address]['if'], $address, is_ipaddrv6($address) ? 6 : 4);
|
||||
} else {
|
||||
// not found, likely proxy arp
|
||||
$anyproxyarp = true;
|
||||
$proxyarp = true;
|
||||
}
|
||||
}
|
||||
unlink($filename);
|
||||
@ -107,7 +108,7 @@ if (!empty($config['virtualip']['vip'])) {
|
||||
$peer = !empty($vipent['peer']) ? $vipent['peer'] : '224.0.0.18';
|
||||
$peer6 = !empty($vipent['peer6']) ? $vipent['peer6'] : 'ff02::12';
|
||||
if ($vipent['mode'] == 'proxyarp') {
|
||||
$anyproxyarp = true;
|
||||
$proxyarp = true;
|
||||
}
|
||||
if (in_array($vipent['mode'], ['proxyarp', 'other'])) {
|
||||
if (isset($addresses[$subnet])) {
|
||||
@ -149,6 +150,6 @@ if (!empty($config['virtualip']['vip'])) {
|
||||
}
|
||||
}
|
||||
|
||||
if ($anyproxyarp) {
|
||||
if ($proxyarp) {
|
||||
interface_proxyarp_configure();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user