New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix wrong ASN discovery on non-BGP Devices #14948
Fix wrong ASN discovery on non-BGP Devices #14948
Conversation
Patch deployed in the field. I will give an update tomorrow how the discovery went. current situation:
|
my ~150 wrong ASns are gone... 🥳 regarding the failed CI task i need a second opinion: is there a chance of wrong test data in
I assume Compared to another huawei (maybe also a bit wrong?)
Compared to a this one (which is pretty sure right...):
|
Wrong is may be a bit excessive 😄 Let say "incomplete" and "forged" 😄 . Usually because people collecting test data are doing it against a real equipment and they want to remove part of the private data. But this is not a big issue. You just need to update the JSON files with the current snmprec data, and they will appear here in the Pull Request. This will help the reviewer to evaluate your code, and all tests must pass before the PR can be merged anyway. |
hmm. can you elaborate my(?) ToDo a bit? |
I wonder about this check... seems like some devices implement bgp without implementing .1.3.6.1.2.1.15.2 |
So, how can me move on here? vrp_ce12804-withvrf.snmprec is abiously wrong. there is no standard The 1.3.6.1.4.1.2011.5.25.177.1.1.2.1.6 entry belongs to The Counter That Records the Times the Remote BGP and not value 1 which is expected I can implement an exeption but 'null' is in my opinion the correct value for this device. |
vrp_ce12804-withvrf.snmprec is incomplete. |
Ok. Not sure why it was written like getNext in the 1st place. Could it be that some funky devices are not replying to BGP4-MIB::bgpLocalAs.0 but BGP4-MIB::bgpLocalAs.1 for instance ? or any other index ? |
Co-authored-by: Tony Murray <murraytony@gmail.com>
8c4b877
to
02f4dcb
Compare
File corrected. I checked all the VRP test data on my dev machine. CI will test the others and return the result here. If tests are OK, then this PR will make it tomorrow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's go
This pull request has been mentioned on LibreNMS Community. There might be relevant details there: |
* Fix wrong as discovery. if peer has no bgp enabled, the bgp as was miss-discovered * Update includes/discovery/bgp-peers.inc.php Co-authored-by: Tony Murray <murraytony@gmail.com> * tests --------- Co-authored-by: Tony Murray <murraytony@gmail.com> Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
There is a mighty error in bgp-peer discovery. Instead a snmp GetNext we should try to catch the first entry with a regular Get. If there is none, the device has no BGP enabled.
a BGP enabled Host (Cisco NCS)
versus a non-BGP enabled Host (Cisco Nexus)
or old Brocade Switch
Whit his fix a non BGP host is detected and bgpLocalAs will be NULLed
tcpdump
This fixes #14752 or Point 1 in #14598 (comment) so we don't query the peering DB with nonexisting ASNs anymore
DO NOT DELETE THE UNDERLYING TEXT
Please note
Testers
If you would like to test this pull request then please run:
./scripts/github-apply 14948
After you are done testing, you can remove the changes with
./scripts/github-remove
. If there are schema changes, you can ask on discord how to revert.