fix(mactrack): correct xform_mac_address typo and resolver/VLAN logic bugs - #342
Conversation
… bugs Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
TheWitness
left a comment
There was a problem hiding this comment.
This might create a regression with Active VLANS. However, to be honest, I don't know why I added those there. I thought that there were several vlans, but it seems you could just do a cacti_sizeof() to get that. I wrote this shit when I was barely a junior PHP coder and it showed.
|
When @bmfmancini has his lab available. I will make a note to ask him to test. |
|
I have a modest production environment that I may be able to help test with. Its 284 devices and 36K+ interfaces |
|
@jdcoats that would be helpful. Thank you. If you have any future requests, let me know thank |
|
funny you mention that :) #152 has been around a while, integrate "sites" and not use separate Cacti and Mactrack sites. |
|
|
@somethingwithproof, no composer.json in Plugin Directories. |
|
@TheWitness understood. #345 drops @jdcoats that PR is the fix for the fatal you hit, apologies for the disruption. While you have the lab up, could you check whether Active VLANs still populates on your Cisco devices? #342 removed a stray |
Extracts the mactrack logic-bug fixes from #333 as a focused, single-purpose change. That PR also bundles a vendored
Net/DNS2tree and regenerated locale files, which belong in separate PRs.Fixes
xform_mac_address(): repair the$max_address/$mac_addresstypo that discarded the trimmed and normalized value, so MAC formatting returns the correct result instead of a stale one.mactrack_resolver.php: correct the inverted$use_resolver/$resolverassignment (a resolver was built only when no nameservers were configured, and skipped when they were).$active_vlans++increment on the$active_vlansarray during VLAN scanning.poller_mactrack.php,mactrack_devices.php,mactrack_scanner.php: related MAC-transform and MacAuth-schedule corrections.Verification
php -lclean on all changed files.tests/Pest/Unit/XformMacAddressTest.phpcovers the MAC transform and guards the production source against the typo regression; full suite passes.