Project

General

Profile

Bug #9193

firewall_nat.php: PHP error deleting an imported NAT rule with no firewall rules present

Added by Jim Pingle about 1 month ago. Updated 19 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Rules/NAT
Target version:
Start date:
12/12/2018
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.4.4_1
Affected Architecture:
All

Description

Scenario:
1. Empty firewall rule list <filter></filter>
2. Imported NAT rules that reference associated filter rules that do not exist because of point 1

Attempting to delete an affected NAT rule will trigger a PHP error:

Fatal error: Uncaught Error: Only variables can be passed by reference in /usr/local/www/firewall_nat.php:104 Stack trace: #0 {main} thrown in /usr/local/www/firewall_nat.php on line 104 PHP ERROR: Type: 1, File: /usr/local/www/firewall_nat.php, Line: 104, Message: Uncaught Error: Only variables can be passed by reference in /usr/local/www/firewall_nat.php:104 Stack trace: #0 {main} thrown

Associated revisions

Revision 701728c0 (diff)
Added by Jim Pingle about 1 month ago

Init filter rules in firewall_nat.php. Fixes #9193

Revision ef0a5fe3 (diff)
Added by Jim Pingle about 1 month ago

Init filter rules in firewall_nat.php. Fixes #9193

(cherry picked from commit 701728c0778cbb4ccf95ebfad30bf56339d1a7e3)

History

#1 Updated by Jim Pingle about 1 month ago

  • Status changed from Assigned to Feedback
  • % Done changed from 0 to 100

#2 Updated by Vladimir Lind 19 days ago

On 2.4.5-dev 20 Nov:

Repeated steps 1 and 2 in bug description - after that triggered PHP error by NAT rule deletion attempt.

On 2.4.5-DEVELOPMENT (amd64) built on Thu Jan 03 15:25:56 EST 2019:

Repeated steps 1 and 2 in bug description - NAT rule with accossiated firewall rule was successfully deleted.
Looks good.

#3 Updated by Jim Pingle 19 days ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF