Skip to content

Commit 80fef72

Browse files
Fixed port forward orphan deletion bug
1 parent e3065f8 commit 80fef72

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

pfSense-pkg-API/files/etc/inc/api/framework/APITools.inc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,8 @@ function sort_nat_rules($top=false, $data=null) {
291291
// Variables
292292
global $config;
293293
$sort_arr = [];
294-
$rules = (array_key_exists(0, $config["nat"]["rule"])) ? $config["nat"]["rule"] : [$config["nat"]["rule"]];
295294

296-
foreach ($rules as $idx => $fre) {
295+
foreach ($config["nat"]["rule"] as $idx => $fre) {
297296
# Check if top mode is enabled, if so add this item to the start of the array
298297
if ($top === true and $idx === $data) {
299298
array_unshift($sort_arr, $fre);
6.76 KB
Binary file not shown.

0 commit comments

Comments
 (0)