From ab31c82a49c295e278da0773890dfd96154a3708 Mon Sep 17 00:00:00 2001 From: Olexiy Trushkovsky <59797062+AlexTrushkovsky@users.noreply.github.com> Date: Tue, 7 Jan 2025 22:52:27 +0200 Subject: [PATCH 1/2] Update FirewallRule.inc --- .../files/usr/local/pkg/RESTAPI/Models/FirewallRule.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/FirewallRule.inc b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/FirewallRule.inc index 965cff52e..abfc7d437 100644 --- a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/FirewallRule.inc +++ b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/FirewallRule.inc @@ -35,6 +35,7 @@ class FirewallRule extends Model { public StringField $descr; public BooleanField $disabled; public BooleanField $log; + public StringField $tag; public StringField $statetype; public BooleanField $tcp_flags_any; public StringField $tcp_flags_out_of; @@ -171,6 +172,10 @@ class FirewallRule extends Model { default: false, help_text: 'Enable or disable logging of traffic that matches this rule.', ); + $this->tag = new StringField( + default: '', + help_text: 'A packet matching this rule can be marked and this mark used to match on other NAT/filter rules. It is called ', + ); $this->statetype = new StringField( default: 'keep state', choices: ['keep state', 'sloppy state', 'synproxy state', 'none'], @@ -200,7 +205,7 @@ class FirewallRule extends Model { help_text: 'The TCP flags that must be set for this rule to match.', ); $this->gateway = new ForeignModelField( - model_name: ['RoutingGateway', 'RoutingGatewayGroup'], + model_name: ['RoutingGateway', 'RoutingGatewayGroup', 'RoutingGatewayStatus'], model_field: 'name', default: null, allow_null: true, From c0f380d6d082ba1b41c80e241f417c602f9db740 Mon Sep 17 00:00:00 2001 From: Olexiy Trushkovsky <59797062+AlexTrushkovsky@users.noreply.github.com> Date: Wed, 8 Jan 2025 14:43:19 +0200 Subject: [PATCH 2/2] added allow_empty to tag --- .../files/usr/local/pkg/RESTAPI/Models/FirewallRule.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/FirewallRule.inc b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/FirewallRule.inc index abfc7d437..3b63f24dd 100644 --- a/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/FirewallRule.inc +++ b/pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/FirewallRule.inc @@ -174,6 +174,7 @@ class FirewallRule extends Model { ); $this->tag = new StringField( default: '', + allow_empty: true, help_text: 'A packet matching this rule can be marked and this mark used to match on other NAT/filter rules. It is called ', ); $this->statetype = new StringField(