Revize 98487487
Přidáno uživatelem Ondřej Fibich před více než 7 roky(ů)
application/libraries/snmp/Mikrotik_Snmp.php | ||
---|---|---|
$this->stopErrorHandler();
|
||
|
||
// parse result
|
||
$regex = '/Hex-STRING: (([0-9a-fA-F]{2}\s){5}[0-9a-fA-F]{2})/';
|
||
$regex = '/Hex-STRING: .*(([0-9a-fA-F]{2}\s){5}[0-9a-fA-F]{2})/';
|
||
$matches = array();
|
||
|
||
// try find MAC address in ARP table
|
||
... | ... | |
}
|
||
|
||
// parse result
|
||
$regex = '/Hex-STRING: (([0-9a-fA-F]{2}\s){5}[0-9a-fA-F]{2})/';
|
||
$regex = '/Hex-STRING: .*(([0-9a-fA-F]{2}\s){5}[0-9a-fA-F]{2})/';
|
||
$matches = array();
|
||
|
||
if (preg_match($regex, $row, $matches) > 0)
|
Také k dispozici: Unified diff
Fixes #1075: Getting MAC from DHCP leases through SNMP on Mikrotik devices with RouterOS 6.35>= by ignoring leading 2 MAC octets.