diff options
author | NOYB <Al_Stu@Frontier.com> | 2016-02-08 19:04:36 -0800 |
---|---|---|
committer | NOYB <Al_Stu@Frontier.com> | 2016-02-08 22:11:44 -0800 |
commit | e1c2947501d9eef131d7fe58e8be031ebfa4e9fb (patch) | |
tree | 238bac3a28e63a7ffcd4888c294f66bbb0ac7d4b /src | |
parent | 8f56118348f9269a27764a0e1aa2b9f5a7be8c13 (diff) | |
download | pfsense-e1c2947501d9eef131d7fe58e8be031ebfa4e9fb.zip pfsense-e1c2947501d9eef131d7fe58e8be031ebfa4e9fb.tar.gz |
A little tweak for code consistency. No functional change.
Diffstat (limited to 'src')
-rw-r--r-- | src/etc/inc/filter.inc | 4 | ||||
-rw-r--r-- | src/usr/local/www/firewall_rules_edit.php | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/etc/inc/filter.inc b/src/etc/inc/filter.inc index f41c091..9dea90a 100644 --- a/src/etc/inc/filter.inc +++ b/src/etc/inc/filter.inc @@ -4240,6 +4240,10 @@ function filter_get_antilockout_ports($wantarray = false) { function ifridx($if, $ridx) { global $config; + if ($ridx < 0) { + return $ridx; + } + $i = $ifridx = 0; foreach ($config['filter']['rule'] as $rulen => $filterent) { if (($filterent['interface'] == $if && !isset($filterent['floating'])) || (isset($filterent['floating']) && "FloatingRules" == $if)) { diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php index cdd33c3..85ec11f 100644 --- a/src/usr/local/www/firewall_rules_edit.php +++ b/src/usr/local/www/firewall_rules_edit.php @@ -923,7 +923,7 @@ if ($_POST) { $seprow = substr($a_separators['sep' . $idx]['row']['0'], 2); // If the separator is located after the place where the new rule is to go, increment the separator row - if (($seprow > $ifridx) || ($after == -1)) { + if ($seprow > $ifridx) { $a_separators['sep' . $idx]['row']['0'] = 'fr' . ($seprow + 1); } } |