Page MenuHomeVyOS Platform

Firewall commit errors should identify which rule caused the failure
Open, NormalPublicBUG

Description

When configuring the firewall, it is common to configure multiple rules in a single commit.

If one of these rules contains an error, the commit will fail, throwing a generic message that doesn't point to the specific rule, e.g.:

[edit firewall ipv4]
user@vyos# commit

Rule action must be defined

[[firewall]] failed
Commit failed

It would be helpful if the error message contained a reference to the rule the message is referring to.

I expect behavior like the following:

[edit firewall ipv4]
user@vyos# set name test-ruleset1 rule 1001 protocol icmp
[edit firewall ipv4]
user@vyos# set name test-ruleset1 rule 1002 protocol icmp
[edit firewall ipv4]
user@vyos# set name test-ruleset2 rule 2001 protocol icmp
[edit firewall ipv4]
user@vyos# set name test-ruleset3 rule 3001 destination port 3389
[edit firewall ipv4]
user@vyos# set name test-ruleset3 rule 3001 action accept 
[edit firewall ipv4]

user@vyos# commit

Rule action must be defined in:
- ipv4 name test-ruleset1 rule 1001
- ipv4 name test-ruleset1 rule 1002
- ipv4 name test-ruleset2 rule 2001

Protocol must be defined if specifying a port or port-group:
- ipv4 name test-ruleset3 rule 3001

[[firewall]] failed
Commit failed

Details

Version
1.4.2
Is it a breaking change?
Perfectly compatible
Issue type
Feature (new functionality)