Skip to content

Commit

Permalink
Timos sap dot1q graphing fix (librenms#13654)
Browse files Browse the repository at this point in the history
* Added wireless MSE

* dot1q sap graph fix

* Fix removed files

* fix

* Fixed style

* Fixed style

* Fixed style

* Removed vscode workspace file

* Clarification
  • Loading branch information
loopodoopo committed Jan 9, 2022
1 parent cc83ab5 commit fa3367f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions LibreNMS/OS/Timos.php
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,13 @@ public function pollMplsSaps($svcs)
$svc_id = $svcs->firstWhere('svc_oid', $svcId)->svc_id;
$traffic_id = $svcId . '.' . $sapPortId . '.' . $this->nokiaEncap($sapEncapValue);

// Any unused vlan on a port returns * in sapEncapValue but had OID .4095
$specialQinQIdentifier = $this->nokiaEncap($sapEncapValue);
if ($specialQinQIdentifier == '*') {
$specialQinQIdentifier = '4095';
$traffic_id = $svcId . '.' . $sapPortId . '.' . $specialQinQIdentifier;
}

$saps->push(new MplsSap([
'svc_id' => $svc_id,
'svc_oid' => $svcId,
Expand Down
5 changes: 5 additions & 0 deletions includes/html/functions.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,11 @@ function generate_port_url($port, $vars = [])

function generate_sap_url($sap, $vars = [])
{
// Overwrite special QinQ sap identifiers
if ($sap['sapEncapValue'] == '*') {
$sap['sapEncapValue'] = '4095';
}

return \LibreNMS\Util\Url::graphPopup(['device' => $sap['device_id'], 'page' => 'graphs', 'type' => 'device_sap', 'tab' => 'routing', 'proto' => 'mpls', 'view' => 'saps', 'traffic_id' => $sap['svc_oid'] . '.' . $sap['sapPortId'] . '.' . $sap['sapEncapValue']], $vars);
}//end generate_sap_url()

Expand Down

0 comments on commit fa3367f

Please sign in to comment.