File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ class FirewallRule extends Model {
7474 allow_interface_groups: true ,
7575 allow_ipsec_interface: true ,
7676 allow_openvpn_interface: true ,
77+ allow_custom: ['any ' ],
7778 many: true ,
7879 help_text: 'The interface where packets must originate to match this rule. ' ,
7980 );
Original file line number Diff line number Diff line change @@ -993,4 +993,21 @@ class APIModelsFirewallRuleTestCase extends TestCase {
993993 $ this ->assert_equals ($ rule ->updated_by ->value , "$ client ->username @ $ client ->ip_address (API) " );
994994 }
995995 }
996+
997+ /**
998+ * Checks that we can create a floating firewall rule with the 'any' interface
999+ */
1000+ public function test_floating_rule_with_any_interface (): void {
1001+ # Create a firewall rule to test with
1002+ $ rule = new FirewallRule (
1003+ type: 'pass ' ,
1004+ interface: ['any ' ],
1005+ ipprotocol: 'inet ' ,
1006+ protocol: 'tcp ' ,
1007+ source: 'any ' ,
1008+ destination: 'any ' ,
1009+ floating: true ,
1010+ );
1011+ $ rule ->validate ();
1012+ }
9961013}
You can’t perform that action at this time.
0 commit comments