Cannot add or delete separators when no rules are present
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
Updated by Danilo Zrenjanin almost 2 years 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.
Updated by Marcos Mendoza over 1 year 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:
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.