Skip to content

Commit

Permalink
Traffic Shaper Wizard ipprotocol fix. Issue #12937
Browse files Browse the repository at this point in the history
  • Loading branch information
vktg committed Apr 20, 2022
1 parent 2d82d2e commit 7d31047
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc
Expand Up @@ -1483,7 +1483,13 @@ function apply_all_chosen_items() {
$rule = array();
$rule['type'] = "match";
$rule['interface'] = $interfacelist;
$rule['ipprotocol'] = "inet46";
if (is_ipaddrv4($config['ezshaper']['step4']['address'])) {
$rule['ipprotocol'] = "inet";
} elseif (is_ipaddrv6($config['ezshaper']['step4']['address'])) {
$rule['ipprotocol'] = "inet6";
} else {
$rule['ipprotocol'] = "inet46";
}
$rule['descr'] = gettext("Penalty Box");
if ($otherpriority) {
$rule['defaultqueue'] = "qOthersLow";
Expand Down Expand Up @@ -1532,7 +1538,6 @@ function apply_all_chosen_items() {
$rule['type'] = "match";
$rule['interface'] = "any";
$rule['ipprotocol'] = $ipprotocol;
$rule['ipprotocol'] = "inet46";
$rule['descr'] = gettext("Connections To Upstream SIP Server");
$rule['protocol'] = "udp";
$rule['defaultqueue'] = "qVoIP";
Expand Down
Expand Up @@ -1569,7 +1569,13 @@ function apply_all_chosen_items() {
$rule = array();
$rule['type'] = "match";
$rule['interface'] = $interfacelist;
$rule['ipprotocol'] = "inet46";
if (is_ipaddrv4($config['ezshaper']['step4']['address'])) {
$rule['ipprotocol'] = "inet";
} elseif (is_ipaddrv6($config['ezshaper']['step4']['address'])) {
$rule['ipprotocol'] = "inet6";
} else {
$rule['ipprotocol'] = "inet46";
}
$rule['descr'] = gettext("Penalty Box");
if ($otherpriority) {
$rule['defaultqueue'] = "qOthersLow";
Expand Down

0 comments on commit 7d31047

Please sign in to comment.