Fix manual port speed storage (#15238)

* Fix port speed setting
Due to a bug all manually configured port speeds were lost and will need to be reconfigured.
This allows them to work in a way that will prevent that issue in the future by storing the speed with the override.
Includes notification.

* Fix date

* Add URL

* Spelling fix
This commit is contained in:
Tony Murray
2023-08-21 10:48:13 -05:00
committed by GitHub
parent b04e31710d
commit 3b7185d825
2 changed files with 6 additions and 1 deletions

View File

@@ -30,7 +30,7 @@ if ($port) {
$port->device->forgetAttrib('ifSpeed:' . $port->ifName);
\App\Models\Eventlog::log("{$port->ifName} Port speed cleared manually", $port->device, 'interface', Severity::Notice, $port_id);
} else {
$port->device->setAttrib('ifSpeed:' . $port->ifName, 1);
$port->device->setAttrib('ifSpeed:' . $port->ifName, $speed);
\App\Models\Eventlog::log("{$port->ifName} Port speed set manually: $speed", $port->device, 'interface', Severity::Notice, $port_id);
$port_tune = $port->device->getAttrib('ifName_tune:' . $port->ifName);
$device_tune = $port->device->getAttrib('override_rrdtool_tune');

View File

@@ -93,5 +93,10 @@
<description>Due to a security vulnerability, you must upgrade your memcached application scripts to the latest version. (1.1)</description>
<pubDate>Fri, 10 Oct 2022 18:00:00 +0000</pubDate>
</item>
<item>
<title>Manually set port speeds reset</title>
<description>Due to a bug, all manually set port speeds will need to be reconfigured. Likely they are set to 1 instead of the expected value. See https://github.com/librenms/librenms/pull/15238 for more information.</description>
<pubDate>Mon, 21 Aug 2023 15:00:00 +0000</pubDate>
</item>
</channel>
</rss>