Ticket #334. There is a very slight possibility that when LAN is disabled or not present the anti-lockout rule will be erroneous. Tighten the conditions more to make sure this does not happen.

This commit is contained in:
Ermal Lui 2010-02-09 22:29:08 +00:00
parent 9868f81861
commit f48ddade4b

View File

@ -1917,7 +1917,7 @@ EOD;
}
}
if(!isset($config['system']['webgui']['noantilockout'])) {
if(count($config['interfaces']) > 1) {
if(count($config['interfaces']) > 1 && !empty($FilterIflist['lan']['if'])) {
/* if antilockout is enabled, LAN exists and has
* an IP and subnet mask assigned
*/
@ -1928,7 +1928,7 @@ anchor "anti-lockout"
pass in quick on {$lanif} from any to ({$lanif}) keep state label "anti-lockout rule"
EOD;
} else {
} else if (count($config['interfaces']) == 1) {
/* single-interface deployment, add to WAN */
$wanif = $FilterIflist["wan"]['if'];
$ipfrules .= <<<EOD