mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-19 11:04:42 +00:00
firewall: simplify this further
This commit is contained in:
parent
ed4bf40bbd
commit
c40b188e8a
@ -80,10 +80,12 @@ function filter_core_antilockout_interface()
|
||||
{
|
||||
global $config;
|
||||
$lockoutif = null;
|
||||
if (!empty($config['interfaces']['lan']['if'])) {
|
||||
$lockoutif = 'lan';
|
||||
} elseif (count(get_configured_interface_with_descr()) == 1 && !empty($config['interfaces']['wan']['if'])) {
|
||||
$lockoutif = 'wan';
|
||||
if (!isset($config['system']['webgui']['noantilockout'])) {
|
||||
if (!empty($config['interfaces']['lan']['if'])) {
|
||||
$lockoutif = 'lan';
|
||||
} elseif (count(get_configured_interface_with_descr()) == 1 && !empty($config['interfaces']['wan']['if'])) {
|
||||
$lockoutif = 'wan';
|
||||
}
|
||||
}
|
||||
return $lockoutif;
|
||||
}
|
||||
@ -116,8 +118,8 @@ function filter_core_antilockout_ports()
|
||||
(!isset($config['system']['ssh']['noauto']) && is_install_media() && is_process_running('sshd'))) {
|
||||
$lockout_ports[] = empty($config['system']['ssh']['port']) ? "22" : $config['system']['ssh']['port'];
|
||||
}
|
||||
sort($lockout_ports);
|
||||
}
|
||||
sort($lockout_ports);
|
||||
return $lockout_ports;
|
||||
}
|
||||
|
||||
|
||||
@ -317,7 +317,7 @@ $( document ).ready(function() {
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (count($lockout_prts) &&!empty($lockout_intf) && !isset($config['system']['webgui']['noantilockout'])): ?>
|
||||
<?php if (count($lockout_prts) && !empty($lockout_intf)): ?>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><i class="fa fa-exclamation fa-fw text-success"></i></td>
|
||||
|
||||
@ -401,7 +401,7 @@ $( document ).ready(function() {
|
||||
</tr>
|
||||
<?php
|
||||
endif; ?>
|
||||
<?php if (count($lockout_prts) && !empty($lockout_intf) && !isset($config['system']['webgui']['noantilockout']) && $selected_if == $lockout_intf): ?>
|
||||
<?php if (count($lockout_prts) && !empty($lockout_intf) && $selected_if == $lockout_intf): ?>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><span class="fa fa-play text-success"></span></td>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user