mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Ignore linkup eventos for interfaces that are member of bridges and have no IP address configured
This commit is contained in:
parent
05741e4540
commit
d9eac32097
@ -76,8 +76,18 @@ function handle_argument_group($iface, $argument2) {
|
||||
return;
|
||||
}
|
||||
|
||||
$ipaddr = $config['interfaces'][$iface]['ipaddr'];
|
||||
$ip6addr = $config['interfaces'][$iface]['ipaddrv6'];
|
||||
if (empty($config['interfaces'][$iface]['ipaddr'])) {
|
||||
$ipaddr = '';
|
||||
} else {
|
||||
$ipaddr = $config['interfaces'][$iface]['ipaddr'];
|
||||
}
|
||||
|
||||
if (empty($config['interfaces'][$iface]['ipaddrv6'])) {
|
||||
$ip6addr = '';
|
||||
} else {
|
||||
$ip6addr = $config['interfaces'][$iface]['ipaddrv6'];
|
||||
}
|
||||
|
||||
$staticv4 = false;
|
||||
if (empty($ipaddr)) {
|
||||
$staticv4 = true;
|
||||
@ -90,6 +100,15 @@ function handle_argument_group($iface, $argument2) {
|
||||
} else {
|
||||
$staticv6 = is_ipaddrv6($ip6addr);
|
||||
}
|
||||
|
||||
/* Take care of events on bridge members when IP is configured on bridge */
|
||||
$bridge_if = link_interface_to_bridge($iface);
|
||||
if (!empty($bridge_if) && empty($ipaddr) && empty($ip6addr)) {
|
||||
log_error("Ignoring link event for bridge member without IP config");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ($staticv4 === true && $staticv6 === true) {
|
||||
$friendly = convert_friendly_interface_to_friendly_descr($iface);
|
||||
log_error("Hotplug event detected for {$friendly}({$iface}) static IP ({$ipaddr} {$ip6addr})");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user