Skip to content

Commit

Permalink
Fixed adding a gateway with a dynamic address to Firewall Rules. Adde…
Browse files Browse the repository at this point in the history
…d tag field to Firewall Rules (#636)

* Update FirewallRule.inc

* added allow_empty to tag
  • Loading branch information
AlexTrushkovsky authored Jan 9, 2025
1 parent ac380e0 commit a030b4e
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -171,6 +172,11 @@ class FirewallRule extends Model {
default: false,
help_text: 'Enable or disable logging of traffic that matches this rule.',
);
$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(
default: 'keep state',
choices: ['keep state', 'sloppy state', 'synproxy state', 'none'],
Expand Down Expand Up @@ -200,7 +206,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,
Expand Down

0 comments on commit a030b4e

Please sign in to comment.