Skip to content

Commit a410938

Browse files
fix(PortForward): use SpecialNetworkField instead of FilterAddressfield
1 parent 397980a commit a410938

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ use RESTAPI\Fields\FilterAddressField;
1111
use RESTAPI\Fields\ForeignModelField;
1212
use RESTAPI\Fields\InterfaceField;
1313
use RESTAPI\Fields\PortField;
14+
use RESTAPI\Fields\SpecialNetworkField;
1415
use RESTAPI\Fields\StringField;
1516
use RESTAPI\Fields\UnixTimeField;
1617
use RESTAPI\Responses\ServerError;
@@ -27,7 +28,7 @@ class PortForward extends Model {
2728
public PortField $source_port;
2829
public FilterAddressField $destination;
2930
public PortField $destination_port;
30-
public FilterAddressField $target;
31+
public SpecialNetworkField $target;
3132
public PortField $local_port;
3233
public BooleanField $disabled;
3334
public BooleanField $nordr;
@@ -96,16 +97,14 @@ class PortForward extends Model {
9697
conditions: ['protocol' => ['tcp', 'udp', 'tcp/udp']],
9798
help_text: 'The destination port this port forward rule applies to. Set to `null` to allow any destination port.',
9899
);
99-
$this->target = new FilterAddressField(
100+
$this->target = new SpecialNetworkField(
100101
required: true,
101102
allow_ipaddr: true,
102103
allow_subnet: false,
103104
allow_alias: true,
104105
allow_interface: false,
105106
allow_interface_ip: true,
106107
allow_interface_groups: false,
107-
allow_any: false,
108-
allow_invert: false,
109108
allow_self: false,
110109
allow_l2tp: false,
111110
allow_pppoe: false,

0 commit comments

Comments
 (0)