mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fixed microsoft windows ipv6 address discovery, thanks to Bill Fenner for his always excellent SNMP/MIB knowledge
git-svn-id: http://www.observium.org/svn/observer/trunk@2135 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -434,6 +434,14 @@ function match_network($nets, $ip, $first=false)
|
||||
function snmp2ipv6($ipv6_snmp)
|
||||
{
|
||||
$ipv6 = explode('.',$ipv6_snmp);
|
||||
|
||||
# Workaround stupid Microsoft bug in Windows 2008 -- this is fixed length!
|
||||
# < fenestro> "because whoever implemented this mib for Microsoft was ignorant of RFC 2578 section 7.7 (2)"
|
||||
if (count($ipv6) == 17 && $ipv6[0] == 16)
|
||||
{
|
||||
array_shift($ipv6);
|
||||
}
|
||||
|
||||
for ($i = 0;$i <= 15;$i++) { $ipv6[$i] = zeropad(dechex($ipv6[$i])); }
|
||||
for ($i = 0;$i <= 15;$i+=2) { $ipv6_2[] = $ipv6[$i] . $ipv6[$i+1]; }
|
||||
|
||||
|
Reference in New Issue
Block a user