Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 98487487

Přidáno uživatelem Ondřej Fibich před asi 7 roky(ů)

Fixes #1075: Getting MAC from DHCP leases through SNMP on Mikrotik devices with RouterOS 6.35>= by ignoring leading 2 MAC octets.

Zobrazit rozdíly:

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