mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
parsing of ipv6 afi on junos bgp poll/discovery
git-svn-id: http://www.observium.org/svn/observer/trunk@1743 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -129,7 +129,10 @@ if (isset($peerlist))
|
||||
$j_peerIndexes[$ip] = $entry['jnxBgpM2PeerIndex'];
|
||||
break;
|
||||
case 'ipv6':
|
||||
# FIXME not implemented yet
|
||||
$ip6 = trim(str_replace(' ','',$entry['jnxBgpM2PeerRemoteAddr']),'"');
|
||||
$ip6 = substr($ip6,0,4) . ':' . substr($ip6,4,4) . ':' . substr($ip6,8,4) . ':' . substr($ip6,12,4) . ':' . substr($ip6,16,4) . ':' . substr($ip6,20,4) . ':' . substr($ip6,24,4) . ':' . substr($ip6,28,4);
|
||||
$ip6 = Net_IPv6::compress($ip6);
|
||||
$j_peerIndexes[$ip6] = $entry['jnxBgpM2PeerIndex'];
|
||||
break;
|
||||
default:
|
||||
echo("PANIC: Don't know RemoteAddrType " . $entry['jnxBgpM2PeerRemoteAddrType'] . "!\n");
|
||||
|
||||
@@ -170,7 +170,10 @@ if ($device['os'] == "junos")
|
||||
$j_peerIndexes[$ip] = $entry['jnxBgpM2PeerIndex'];
|
||||
break;
|
||||
case 'ipv6':
|
||||
# FIXME not implemented yet
|
||||
$ip6 = trim(str_replace(' ','',$entry['jnxBgpM2PeerRemoteAddr']),'"');
|
||||
$ip6 = substr($ip6,0,4) . ':' . substr($ip6,4,4) . ':' . substr($ip6,8,4) . ':' . substr($ip6,12,4) . ':' . substr($ip6,16,4) . ':' . substr($ip6,20,4) . ':' . substr($ip6,24,4) . ':' . substr($ip6,28,4);
|
||||
$ip6 = Net_IPv6::compress($ip6);
|
||||
$j_peerIndexes[$ip6] = $entry['jnxBgpM2PeerIndex'];
|
||||
break;
|
||||
default:
|
||||
echo("PANIC: Don't know RemoteAddrType " . $entry['jnxBgpM2PeerRemoteAddrType'] . "!\n");
|
||||
|
||||
Reference in New Issue
Block a user