VRF-LITE support ARP #3359

Merged
merged 2 commits into from Apr 29, 2016

Projects

None yet

3 participants

@Tristan-Labbe
Contributor

New pull request with only arp-table discovery.
For more details, you can see the pull #3255

Tristan-Labbe added some commits Apr 12, 2016
@Tristan-Labbe Tristan-Labbe Update arp-table.inc.php 12d6347
@Tristan-Labbe Tristan-Labbe Update poller.php
b4b58a9
@Tristan-Labbe
Contributor

Hello @laf,

Can you say me if this PR is OK ?

@laf
Member
laf commented Apr 19, 2016

Seems fine, I assume it relies on #3255 though?

@Tristan-Labbe
Contributor

Yes it relies on #3255.

@Tristan-Labbe
Contributor

What is the next step ?

@Tristan-Labbe
Contributor

Up.
Please can you tell me what is the next step for this PR ?

@laf
Member
laf commented Apr 26, 2016

The other PR needs to be fixed so we can merge if this relies on it.

@laf laf commented on the diff Apr 28, 2016
includes/discovery/arp-table.inc.php
@@ -4,6 +4,16 @@
echo 'ARP Table : ';
+if( key_exists('vrf_lite_cisco', $device) && (count($device['vrf_lite_cisco'])!=0) ){
+ $vrfs_lite_cisco = $device['vrf_lite_cisco'];
+}
+else {
+ $vrfs_lite_cisco = array(array('context_name'=>null));
+}
+
+foreach ($vrfs_lite_cisco as $vrf) {
@laf
laf Apr 28, 2016 Member

This seems to be the same as the other PR.

I'm not convinced this code does what is intended. You are setting $vrfs_lite_cisco to a string if vrf_lite_cisco is detected and then trying to loop through it. If it's not found vrf_lite_cisco then your setting an array into an array and trying to loop through it.

@laf laf merged commit 9dea0c8 into librenms:master Apr 29, 2016

3 checks passed

Auto-Deploy Build finished. No test results found.
Details
Scrutinizer 1 new issues
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment