mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 00:24:40 +00:00
firewall: make rule parsing more consistent as x:any and any:y are valid options, accepting literal "any" seems to make sense. closes https://github.com/opnsense/plugins/issues/2957
This commit is contained in:
parent
43958b00cc
commit
9ff04d14b4
@ -280,6 +280,8 @@ abstract class Rule
|
||||
if (strpos($port, ':any') !== false xor strpos($port, 'any:') !== false) {
|
||||
// convert 'any' to upper or lower bound when provided in range. e.g. 80:any --> 80:65535
|
||||
$port = str_replace('any', strpos($port, ':any') !== false ? '65535' : '1', $port);
|
||||
} elseif ($port == 'any') {
|
||||
$port = null;
|
||||
}
|
||||
if (Util::isPort($port)) {
|
||||
$rule[$target . "_port"] = $port;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user