diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/conf.default/config.xml | 2 | ||||
-rw-r--r-- | src/etc/inc/globals.inc | 2 | ||||
-rw-r--r-- | src/etc/inc/upgrade_config.inc | 27 |
3 files changed, 29 insertions, 2 deletions
diff --git a/src/conf.default/config.xml b/src/conf.default/config.xml index 392bd88..d5cdc8f 100644 --- a/src/conf.default/config.xml +++ b/src/conf.default/config.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <pfsense> - <version>14.8</version> + <version>14.9</version> <lastchange/> <system> <optimization>normal</optimization> diff --git a/src/etc/inc/globals.inc b/src/etc/inc/globals.inc index fb1bb6f..f160eb3 100644 --- a/src/etc/inc/globals.inc +++ b/src/etc/inc/globals.inc @@ -99,7 +99,7 @@ $g = array( "disablecrashreporter" => false, "crashreporterurl" => "https://crashreporter.pfsense.org/crash_reporter.php", "debug" => false, - "latest_config" => "14.8", + "latest_config" => "14.9", "nopkg_platforms" => array("cdrom"), "minimum_ram_warning" => "101", "minimum_ram_warning_text" => "128 MB", diff --git a/src/etc/inc/upgrade_config.inc b/src/etc/inc/upgrade_config.inc index 131535e..15fc0b4 100644 --- a/src/etc/inc/upgrade_config.inc +++ b/src/etc/inc/upgrade_config.inc @@ -4752,4 +4752,31 @@ function upgrade_147_to_148() { } } } + +function upgrade_148_to_149() { + global $config; + global $altq_list_queues; + + if (!isset($config['shaper']['queue']) || !is_array($config['shaper']['queue'])) + return; + + read_altq_config(); + + /* Set root queue bandwidth. */ + foreach ($altq_list_queues as $altq) { + $sum = $altq->GetTotalBw(); + while ($sum > get_queue_bandwidth($altq)) { + if (intval(($sum / 1000) * 1.2) < 1024 * 1024) + /* 1Gb where possible. */ + $bw = 1024 * 1024; + else + /* Increase by 20% until it fits. */ + $bw = intval(($sum / 1000) * 1.2); + $altq->SetBandwidth($bw); + $altq->SetBwscale("Kb"); + $altq->wconfig(); + $sum = $altq->GetTotalBw(); + } + } +} ?> |