@@ -11,6 +11,7 @@ use RESTAPI\Fields\FilterAddressField;
1111use RESTAPI \Fields \ForeignModelField ;
1212use RESTAPI \Fields \InterfaceField ;
1313use RESTAPI \Fields \PortField ;
14+ use RESTAPI \Fields \SpecialNetworkField ;
1415use RESTAPI \Fields \StringField ;
1516use RESTAPI \Fields \UnixTimeField ;
1617use 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