Skip to content

Commit

Permalink
Merge pull request #4533 from laf/swos-fix-maybe
Browse files Browse the repository at this point in the history
fix: Fixed swos discovery
  • Loading branch information
laf committed Sep 22, 2016
2 parents 4f5d191 + edbbc7f commit 44fe868
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion includes/discovery/os/swos.inc.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

if (str_contains($sysDescr, array('RB260GS', 'RB250GS', 'RB260GSP'))) {
if (str_contains(snmp_get($device, 'SNMPv2-MIB::sysName.0', '-Oqv', ''), 'MicroTik')) {
if (str_contains(snmp_get($device, 'SNMPv2-MIB::sysName.0', '-Oqv', ''), 'MikroTik')) {
$os = 'swos';
}
}
2 changes: 1 addition & 1 deletion tests/OSDiscoveryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1271,7 +1271,7 @@ public function testSupermicroswitch()
public function testSwos()
{
$mockSnmp = array(
'SNMPv2-MIB::sysName.0' => 'MicroTik'
'SNMPv2-MIB::sysName.0' => 'MikroTik'
);
$this->checkOS('swos', 'RB250GS', '', $mockSnmp);
$this->checkOS('swos', 'RB260GS', '', $mockSnmp);
Expand Down

0 comments on commit 44fe868

Please sign in to comment.