Skip resolving IP addresses to improve performance.

This commit is contained in:
FusionPBX
2022-08-18 23:31:42 -06:00
committed by GitHub
parent a9e534f1fa
commit f8f09f9a31

View File

@@ -86,7 +86,7 @@
//loop through the chains
if (is_array($chains)) {
foreach ($chains as $chain) {
$command = "iptables --list INPUT | grep ".$chain." | awk '{print \$1}' | sed ':a;N;\$!ba;s/\\n/,/g' ";
$command = "iptables --list INPUT --numeric | grep ".$chain." | awk '{print \$1}' | sed ':a;N;\$!ba;s/\\n/,/g' ";
//if ($debug) { echo $command."\n"; }
$response = shell($command);
if (!in_array($chain, explode(",", $response))) {