Skip to content

Commit

Permalink
Merge pull request #4522 from fl0l0u/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
rbgarga committed Jun 23, 2021
2 parents 994699b + b5c9be9 commit d1b2d74
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/etc/inc/util.inc
Expand Up @@ -3487,9 +3487,7 @@ function parse_cisco_acl_rule($rule, $devname, $dir, $proto) {
} else if (trim($rule[$index]) == "range") {
$port = array($rule[++$index], $rule[++$index]);
if (is_port($port[0]) && is_port($port[1])) {
$port[0]--;
$port[1]++;
$tmprule .= "port {$port[0]} >< {$port[1]} ";
$tmprule .= "port {$port[0]}:{$port[1]} ";
} else {
syslog(LOG_WARNING, "Error parsing rule {$rule_orig}: Invalid source ports: '$port[0]' & '$port[1]' one or both are not a numeric value between 0 and 65535.");
return;
Expand Down Expand Up @@ -3562,9 +3560,7 @@ function parse_cisco_acl_rule($rule, $devname, $dir, $proto) {
} else if (trim($rule[$index]) == "range") {
$port = array($rule[++$index], $rule[++$index]);
if (is_port($port[0]) && is_port($port[1])) {
$port[0]--;
$port[1]++;
$tmprule .= "port {$port[0]} >< {$port[1]} ";
$tmprule .= "port {$port[0]}:{$port[1]} ";
} else {
syslog(LOG_WARNING, "Error parsing rule {$rule_orig}: Invalid destination ports: '$port[0]' '$port[1]' one or both are not a numeric value between 0 and 65535.");
return;
Expand Down

0 comments on commit d1b2d74

Please sign in to comment.