Skip to content

Commit a030b4e

Browse files
Fixed adding a gateway with a dynamic address to Firewall Rules. Added tag field to Firewall Rules (#636)
* Update FirewallRule.inc * added allow_empty to tag
1 parent ac380e0 commit a030b4e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/FirewallRule.inc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class FirewallRule extends Model {
3535
public StringField $descr;
3636
public BooleanField $disabled;
3737
public BooleanField $log;
38+
public StringField $tag;
3839
public StringField $statetype;
3940
public BooleanField $tcp_flags_any;
4041
public StringField $tcp_flags_out_of;
@@ -171,6 +172,11 @@ class FirewallRule extends Model {
171172
default: false,
172173
help_text: 'Enable or disable logging of traffic that matches this rule.',
173174
);
175+
$this->tag = new StringField(
176+
default: '',
177+
allow_empty: true,
178+
help_text: 'A packet matching this rule can be marked and this mark used to match on other NAT/filter rules. It is called ',
179+
);
174180
$this->statetype = new StringField(
175181
default: 'keep state',
176182
choices: ['keep state', 'sloppy state', 'synproxy state', 'none'],
@@ -200,7 +206,7 @@ class FirewallRule extends Model {
200206
help_text: 'The TCP flags that must be set for this rule to match.',
201207
);
202208
$this->gateway = new ForeignModelField(
203-
model_name: ['RoutingGateway', 'RoutingGatewayGroup'],
209+
model_name: ['RoutingGateway', 'RoutingGatewayGroup', 'RoutingGatewayStatus'],
204210
model_field: 'name',
205211
default: null,
206212
allow_null: true,

0 commit comments

Comments
 (0)