Project

General

Profile

Bug #10827

Cannot add or delete separators when no rules are present

Added by Max Leighton 5 months ago. Updated 10 days ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
Rules / NAT
Target version:
Start date:
08/11/2020
Due date:
% Done:

0%

Estimated time:
Affected Version:
2.4.5-p1
Affected Architecture:
All

Description

If separators exist without any rules, they will reappear after being deleted and saved. The same behavior can be seen in NAT>Port Forwards

Steps to reproduce:

1.) Create one or more separator at Firewall / Rules

2.) Delete all rules on the interface while leaving the separator and apply changes

3.) Attempt to delete the separator with no rules present on the interface and save

The separators will fail to be deleted.

The separator can be deleted by adding a rule before attempting it

Associated revisions

Revision c8207c6c (diff)
Added by Dan Mackie about 1 month ago

Fix separators not updating - Issue #10827

Revision 4924f4ae (diff)
Added by Dan Mackie about 1 month ago

Fix separators not updating - Issue #10827

- Fixed separator logic to allow adding/deleting separators when no rules are present
- Fixed incorrect dirty assignment

History

#1 Updated by Danilo Zrenjanin 5 months ago

  • Status changed from New to Feedback

I couldn't reproduce the issue on the CE image.

Here is what I found irregular:
1)If I first create a separator (on an empty list) then create a rule, the separator gets deleted.
2)Deleting any rule will delete the separator.

#2 Updated by Marcos Mendoza 5 months ago

  • Subject changed from Cannot delete separators when no rules are present in Firewall>Rules to Cannot add or delete separators when no rules are present

I was able to reproduce this, and it looks to affect both firewall_nat.php and firewall_rules.php.

Neither adding or removing separators will work when no rules exist.

At least part of the issue seems to be here:
https://github.com/pfsense/pfsense/blob/532be9051b3e633507ec864394b825a7a69a4bec/src/usr/local/www/firewall_rules.php#L218

The code to update the separators only exists within the code that checks if rules exist. Hence, if no rules exist, separator additions are not updated.

#3 Updated by Kris Phillips 4 months ago

This item should be moved from Feedback to Confirmed, please. I also tested this and can confirm that it is present in 2.4.5p1.

#4 Updated by Marcos Mendoza 4 months ago

  • Status changed from Feedback to Confirmed

#6 Updated by Jim Pingle about 1 month ago

  • Status changed from Confirmed to Pull Request Review
  • Assignee set to Steve Beaver
  • Target version set to 2.5.0

#7 Updated by Steve Beaver about 1 month ago

PR has been approved

#8 Updated by Renato Botelho 18 days ago

  • Status changed from Pull Request Review to Feedback

PR has been merged. Thanks!

#9 Updated by Alhusein Zawi 17 days ago

I was able to delete separators after deleting the rules

Steps:
created 2 separator.
Created 2 rules and applied changes.
Deleted rules and applied changes.
Deleted separator and saved.
separators have been deleted.

2.5.0.a.20201231.0250

#10 Updated by Viktor Gurov 17 days ago

  • Status changed from Feedback to Resolved

#11 Updated by Jim Pingle 10 days ago

  • Category changed from Web Interface to Rules / NAT

Also available in: Atom PDF