src: style sweep

This commit is contained in:
Franco Fichtner 2022-08-08 10:47:56 +02:00
parent a8697dd4ea
commit f8fdc8deac
2 changed files with 3 additions and 3 deletions

View File

@ -596,13 +596,13 @@ function _interfaces_gre_configure($gre)
$gre['greif'],
$gre['tunnel-local-addr'],
$gre['tunnel-remote-net'],
]);
]);
} else {
mwexecf('/sbin/ifconfig %s inet6 %s %s prefixlen 128', [
$gre['greif'],
$gre['tunnel-local-addr'],
$gre['tunnel-remote-addr'],
]);
]);
}
} else {
mwexecf('/sbin/ifconfig %s inet6 ifdisabled', [$gre['greif']]);

View File

@ -282,7 +282,7 @@ abstract class Rule
$rule[$target] = "!" . $rule[$target];
}
if (isset($rule['protocol']) && in_array(strtolower($rule['protocol']), array("tcp","udp","tcp/udp"))) {
$port =!empty($rule[$tag]['port']) ? str_replace('-', ':', $rule[$tag]['port']) : null;
$port = !empty($rule[$tag]['port']) ? str_replace('-', ':', $rule[$tag]['port']) : null;
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);