Skip to content

Latest commit

 

History

History
407 lines (322 loc) · 18.1 KB

CHANGELOG.md

File metadata and controls

407 lines (322 loc) · 18.1 KB

ChangeLog

--- develop ---

  • security: Replace MAC action request deserialization with escaped JSON payloads
  • security: Validate and escape MAC bulk-action form values before rendering
  • security: Escape rescan executable and script paths before command execution
  • security: Parameterize stale-process site filtering and validate process IDs before termination
  • security: Escape Cabletron SNMP command arguments and normalize numeric options
  • security: Safely quote ignored-interface regexes and normalize interface report filters
  • security: Normalize device report SQL filters before query construction
  • security: Normalize administrative device list SQL filters before query construction
  • security: Validate canonical local-file paths for OUI database imports
  • security: Restrict Net_DNS2 cache deserialization to DNS response classes
  • security: Remove all inline JavaScript handlers like onClick, onChange
  • security: Add a version-safe CSP nonce (plugin_mactrack_csp_nonce()) to every inline <script> tag
  • security: Require POST for the device rescan, site scan, enable and disable actions
  • issue#246: Fix Cisco device collection
  • issue#248: Cacti process control, terminate dns resolvet when is nothing to do
  • issue#250: Disable automatic MIBs load
  • issue#349: Keep punctuation in the port name filter
  • issue#350: Leave an empty hardware address empty
  • issue#353: Stop re-querying addresses that have no PTR record
  • issue#357: Prevent repeated database setup from duplicating the Default site
  • issue: Convert plugin bootstrap include/include_once calls to fail-fast require/require_once across the web, CLI, and hook entry points
  • issue: Relocate the per-theme override stylesheets from themes// to css// alongside the base css/mactrack.css
  • issue: Enforce patch coverage of changed lines in CI and remove the inert COMPOSER_ROOT_VERSION env from the Pest step
  • issue: Pin the CI database image and shared test dependencies, disable persisted checkout credentials, and limit workflow permissions and runtime
  • issue: Reach PHPStan level 8 with zero errors across all first-party PHP and add native function return type declarations, using no baselines or inline suppressions
  • issue: Use prepared statements for all vendor collection
  • issue: Use prepared statements for device-reported values in the interface, ARP, DHCP snooping and 802.1x scanners
  • issue: Fix a variable-variable typo that broke 3Com interface-graph mac updates
  • issue: Return the rendered device-row HTML from the enable/disable AJAX handlers, which previously captured an always-null value
  • issue: Decode MAC/IP OIDs as hex in the Extreme scanner by correcting a misplaced xform_stripped_oid() argument
  • issue: Fix an undefined $ifindex reference (should be $ifIndex) in the Nortel Bay scanner
  • issue: Fix a misplaced parenthesis in the running-process stats parser
  • issue: Remove a trailing comma before WHERE in the device edit page's SNMP settings UPDATE, which caused an SQL syntax error whenever the SNMP settings were auto-corrected
  • issue: Fix the Graphs tab fatal error "Call to undefined function graph_view_has_untemplated_graphs()" on Cacti 1.2.x
  • issue: Make the MacTrack tab script repoint only the MacTrack main tab rather than whichever main tab is selected
  • issue: Align the documented PHP floor with the PHP 8.2 CI/test contract
  • issue: Return the unformatted MAC when mt_mac_format is unset rather than a null address
  • issue: Call mactrack_format_mac() from the ARP export instead of a function that does not exist
  • issue: Drop the mactrack_ajax.php graph-settings action, whose handler was removed in 2016
  • issue: Stop stripping regular expression characters from the Ports to Ignore setting
  • issue: Harden device-type vendor filtering against SQL injection
  • issue: Validate aggregated MAC bulk-action IDs and use prepared deletion SQL
  • issue: Fix PHP 8 parameter ordering and partition conversion arguments
  • issue: Uncaught type error in mactrack_view_arp.php for ifName
  • issue: Mactrack does not shutdown properly due to incorrect use of unregister_process
  • issue: Fixing some internationalization (i18n) issues
  • issue: Mac Addresses are not displaying correctly
  • feature#68: Proxy Option for downloading MAC/OUI Database
  • feature#228: Add more MAC address formats
  • feature: Add a root manifest.json and upgrade-time file pruning (mactrack_prune_files()) that removes tombstoned and dev-only paths
  • feature: Add a Dashboard tab (the first MacTrack tab) presenting admin status cards in a draggable, add/remove
  • feature: On the MAC Addresses tab, show the authorization state as a themed status pill consistent with the interface and 802.1x pills
  • feature: On Cacti 1.2.32+, zebra-stripe the interfaces list and add an "Issues" column of clickable status pills
  • feature: Add a status pill column to the 802.1x view after the username; clicking the pill drills down by setting the Status filter to that session status
  • feature: Lay the interfaces and dot1x status legends out as a centered footer in normal document flow via a shared .mactrackLegendFooter class
  • feature: Restyle the interfaces and dot1x status legends as rounded, evenly-spaced solid-colour chips with theme-appropriate colours
  • feature: Ship a dedicated per-theme stylesheet for every Cacti theme

--- 4.8 ---

  • issue#232: Not working adding devices to Cacti
  • issue#236: Fix TPlink active vlan gathering
  • issue#243: Fix incorrect variable in Aruba OS-CX functions
  • issue#244: Nonresponding devices in debug mode can cause PHP errors
  • feature#242: Rename "Device Tracking" to "Mactrack"

--- 4.7 ---

  • issue#206: Improve PHP8.x - undefined variables, array keys, ...
  • issue#198: Better control for DNS resolving process

--- 4.6 ---

  • issue#148: Bad value of mactrack/Devices/UserPortsUP
  • issue#156: mactrack/lib/mactrack_functions.php :error Undefined offset:
  • issue#162: Port no and Port name not showing in Mac Address Tab
  • issue#178: MACTRACK 4.5 on CACTI 1.2.23 doesn't send mail (SMTP send mail verified, ok)
  • issue#181: Interface ifLastChange unable to handle results returned in timetics
  • issue#183: Undefined array key in lib/mactrack_functions.php
  • issue#184: add H3C/3Com modern switches/routers
  • issue#189: Add IP addresses retention
  • issue#190: Add HPE/Aruba OSCX switches
  • issue#192: Improve working with SNMP sets
  • issue#195: Fix incorrectly recognizing device types
  • issue#199: Fix authorize/revoke macs
  • issue#200: Add process control to dns resolver
  • feature: Prepared device types
  • feature#197: Add more default device types

--- 4.5 ---

  • security: Fix potential security exposure with unserialize() function
  • issue#165: The file mactrack_actions.php will throw and error if an the $save array is discarded by another plugin
  • issue#169: Add back support for the MacTrack ARP Table
  • issue#175: Uncaught TypeError: sizeof(): Argument #1 ($value) must be of type Countable|array
  • feature#170: Add support for Cisco VRF ARP Table

--- 4.3 / 4.4 ---

  • bug: unable to delete Mac Watch and Sites records
  • bug: Mac Watch can not send mail
  • bug: Number of devices scanned incorrect for main scanner
  • bug: MacAuthorizations Interface not accessible through MacTrack tab
  • bug: Mac Watch can not send mail
  • issue#70: Fix issue with Prompt confirmation button
  • issue#75: Command Line does not show output
  • issue#77: dlink switch vlan name is null
  • issue#75: Command Line does not show output
  • issue#81: Add support for FontAwesome 5.0 under Cacti 1.2
  • issue#82: Device Type shows twice / % does not work with Vendor SNMP Object ID Match
  • issue#87: Cant save settings on Cacti devices when MacTrack plugin is enabled
  • issue#94: Fix issue with Mac Watch emails disabling plugin
  • issue#98: Fix DB maintenance not running automatically
  • issue#105: Error when starting Mactrack scan
  • issue#107: MACTRACK ERROR: Can not start MAC Tracking process. There is already one in progress
  • issue#109: Column 'vlan_name' cannot be null
  • issue#110: Undefined offset for all vlans retrieved.
  • issue#111: String size overflow in file: mactrack_functions.php
  • issue#112: Mactrack user settings typo says max addresses instead of mac addresses.
  • issue#114: Uncaught Error: Class 'Net_DNS2_Resolver' not found in mactrack_resolver.php
  • issue#115: ERROR: 802.1x Address Scanning Function Does Not Exist.
  • issue#116: cacti 1.1.38 mactrack 4.2 ED IP ADDRESS - ED DNS Hostname
  • issue#117: Juniper EX4200 issues with getJEX_switch_ports
  • issue#118: Undefined property: Net_DNS2_RR_CNAME::$ptrdname in file
  • issue#117: Juniper EX4200 issues with getJEX_switch_ports
  • issue#119: No values for Dot1x and browser hangs
  • issue#120: mactrack_import_ouidb.php has incorrect path to function definitions
  • issue#128: Maria upgrade 'Error: Index column size too large. The maximum column size is 767 bytes.'
  • issue#132: Changing device type sometimes create a duplicate entry
  • issue#137: CMDPHP ERROR: A DB Exec Failed!, Error: Duplicate entry '7' for key 'PRIMARY'
  • issue#143: mactrack_resolver.php variable vlan_id line 176
  • feature: PHP 7.2 compatibility
  • feature: Switch port_number to integer type of performance reasons
  • feature: Update Net_DNS2 to version 1.5
  • feature: Use local DNS to resolve when either the resolver fails or there are no DNS servers listed
  • feature: Update Net_DNS2 to version 1.5

--- 4.2 ---

  • feature: Basic documentation under github wiki + screenshots
  • issue#50: False positive errors in Cacti log relative to 802.1x functions
  • issue#52: Issues with paths to icons and pages
  • issue#53: Issues with unset $scan_date variable
  • issue#54: Resolving SQL errors in mactrack_resolver.php
  • issue#57: Correct percentage sign issues in setup.php
  • issue#61: Correct issue with function detection in mactrack_scanner.php
  • feature: new 802.1x scanning function (for cisco devices).
  • feature: new IP Scanning function 'DHCP Snooping' (for cisco devices).
  • feature: add port name column to IP Address view
  • feature: cacti.pot updated
  • feature: Added new TAB View Dot1x Sessions
  • feature: Added mactrack.css for every theme.
  • issue: Fix OUI Database import was removing existing records when failed.

--- 4.1 ---

  • feature: Updates to facilitate i18n by contributors
  • issue#25: Unable to remove Site
  • issue#34: Ambiguous messages when running the MacTrack poller

--- 4.0 ---

  • feature: Cacti 1.0 compatibility
  • feature: i18n MacTrack
  • feature: interface backgrounds in CSS
  • feature: use jQuery exclusively for dom manipulation
  • issue#22: Mactrack devices, 'Save' option missing.
  • issue#17: MacTrack Show Site SQL Syntax
  • issue#16: MacTrack Undefined indexes and offsets
  • issue: MacTrack view Interfaces showed wrong color for interfaces UP.
  • issue: MacTrack view MACs 'portname' filter option missing.
  • feature: Removed deprecated ifInNUcastPkts and IfOutNUcastPkts and replaced by Ifin/OutMulticastPkt and Ifin/OutBroadcastPkt.
  • feature: Updated spanish translations

--- 3.0 ---

  • bug#0001838: support partitioned tables mac_track_ports
  • bug#0001858: No device filter on Graphs tab
  • bug#0001873: hook 'mactrack', 'page_head'
  • bug#0001865: rescan doesn't work
  • bug: don't use htmlspecialchars recursively in forms
  • bug: make the device removal a global function
  • bug: don't generate replace errors if device has an apostrophe
  • bug: reorganize API functions to assist third party integrations
  • bug: use qstr instead of addslashes as it's not reliable
  • feature: Attempt to kill processes if they have run over their allotted time
  • feature: Support new Theme engine

--- 2.9 ---

  • bug#0001799: Select all checkbox on Mac Addresses tab not working
  • bug#0001723: Can't import devices
  • bug#0001751: Multiple ignore ports for Extreme Network switch
  • bug#0001777: MacTrack MacAuth Filters not working
  • bug#0001779: Site IP Range Report View
  • bug#0001841: Mactrack ARP table unreadable
  • bug: Saving an edited site redirects to blank page

--- 2.8 ---

  • compat: Allow proper navigation text generation
  • bug: Guest user could not access site

--- 2.7 ---

  • bug#0001742: PHP error () in lib/mactrack_extreme.php
  • bug#0001743: DEBUG: Authorized MAC ID: empty
  • bug: Correcting SNMPv3 and Cisco support
  • bug: Importing OUIDB broken with redefine function error
  • bug: Exporting Devices from the Console did not work
  • bug: Lastchange was not displaying correctly

--- 2.6 ---

  • feature:#0001718: New get_arp_table function for Extreme Networks devices
  • bug#0001665: New line missing when printing Cisco device stats
  • bug#0001668: Mactrack sometimes shows "No results found" when results are shown
  • bug#0001670: spikekill and mactrack JS functions clash stateChanged and getfromserver
  • bug#0001677: index initialization errors (courtesy toe_cutter)
  • bug#0001677: unintended overwrite of non-synced devices (courtesy toe_cutter)
  • bug#0001717: Ip addresses range report a false value
  • bug: Undefined index when paging through interfaces
  • bug: Graph View still being called for one class of graphs incorrectly
  • bug: With Scan Date set to 'All' rows counter was not correct for matches
  • bug: When viewing IP's, device filter not operable

--- 2.5 ---

  • bug#0001677: Undefined indexes
  • bug: Undefined index reports in mactrak_view_graphs.php
  • bug: Small visual issue with Site Details
  • bug: Interfaces table not being created during upgrade
  • feature: Portname search filter courtesy KAA and gthe

--- 2.4 ---

  • bug: 0001546: mactrack_view_devices does not display the proper page numbers
  • bug: 0001545: mactrack_scanner does not complete successfully for some hosts
  • bug: 0001547: mactrack_view_sites does not show page numbers
  • bug: 0001548: mactrack_view_macs various issues
  • bug: IEEE Database import runs out of memory
  • bug: Correct uninitialized error in mactrack_hp.php
  • bug: Resolved issue where Vendor Mac was lost during resolver process
  • bug: fix syntax of cacti_snmp_* calls
  • feature: 0001638: Allow Interface Data to Be "Scanned" on Demand from the WebUI Similar to Scanner
  • feature: 0001637: Enable Site Level Scanning Through the UI and Using Ajax
  • feature: Adding support for ArpWatch
  • feature: Adding Juniper Support
  • feature: Support Foundry Dual Mode Ports
  • feature: Implement MacWatch in code. E-Mailing now.
  • feature: Adding significant content to the mac_track_interfaces table
  • feature: Implement MacAuth functionality and periodic reports
  • feature: Implement Interfaces tab to MacTrack
  • feature: Aggregated ports patch from Gthe!
  • feature: Linux and DLink Scanners from Gthe!
  • feature: add all device SNMP options to mac_track_devices
  • feature: add full SNMP V3 support
  • feature: deprecate readstrings; maintain "SNMP Option Sets" in favour of them
  • feature: some Enterasys scanning functions (N7, C2, C3)
  • feature: import cacti devices into mac_track_devices (new action hook for host.php)
  • feature: optionally sync SNMP settings of mac_track_devices and cacti device
  • feature: allow for "connecting" existing mactrack devices to cacti devices
  • feature: copy snmp settings from cacti devices to mactrack devices
  • feature: Allow mapping of Cacti graphs to MacTrack
  • feature: Add columns for AutoNegotiation - Implementation TBD

--- 1.1 ---

  • First Official Release

--- 0.1 ---

  • Initial Release! Oh, so long ago

Changes made in Mactrack plugin by woranhun

Fixing bug: mac addresses were not visible under MAC Addresses tab

https://github.com/Cacti/plugin_mactrack/commit/cc681b143cfdd43ec79a800009699308d5832407

The bug occurred when using Juniper EX2200 Switches.

$Xvlanid = substr($num, 0, strpos($num, '.'));

was changed to

$Xvlanid = substr($num, strpos($num, '.')+1, strpos($num, '.',1)-1);

and

$ifIndex  = @$port_results[$mac_result];

was changed to

$ifIndex  = @$port_results[".".strval($mac_result)];

in the lib\mactrack_juniper.php file.

An extra dot was added to the keys of the port dictionary when it was made from the OID.

More bug fixing with Juniper switches

https://github.com/Cacti/plugin_mactrack/commit/f2deee43c1229e5bd3110e19e685153b57bfc76c

Changes are available on the link above.

Fixing bug: The MAC addresses had 7 groups instead of 6. They were too

long.

Basically the start position of the substring was wrong.

Fixing Juniper trunk port counter

When using Juniper switches the trunk counter was not implemented.

	/* get VLAN Trunk status */
	$vlan_trunkstatus = xform_standard_indexed_data('.1.3.6.1.4.1.2636.3.40.1.5.1.7.1.5', $device);
	foreach ($vlan_trunkstatus as $vts) {
		if ($vts == 2) {
			$device['ports_trunk']++;
		}
	}

was added to the code.

Fixing: port names issue

Changed Juniper port names, port numbers and port descriptions according to Cisco's equivalent of the same fields in the DB. Port number became Interface name (e.g. ge-0/0/0.0). Port name became Interface description. Port description was added to $ifInterfaces. Tested with EX-2200 switches.

Interface description are now visible under the interfaces tab and

port_name cannot be null.

https://github.com/Cacti/plugin_mactrack/commit/bc5ba709134006488a80b4cf3beae782fd9fbd84

Juniper port ignore

https://github.com/Cacti/plugin_mactrack/commits/develop (it was not accepted by the official Cacti repository when the documentation was made.)

Port ignore option was not implemented for Juniper switches.

Mactrack cheat sheet

mactrack scanner

Main debugging tool:

-d stands for debug mode.

-id=deviceid selects the device on which the scan will run

The result of the scan will be saved to the mac_track_temp_ports table in mysql. It won't be merged into the mac_track_ports table which is used by Cacti to build the view macs webpage.

php mactrack_scanner.php -d -id=10

mactrack poller

It runs the SNMP poller on all devices

php poller_mactrack.php -d -f

-d stands for debug mode

-f means force (~ run now, don't wait for the next scheduled scan.)

Terminated mactrack process

If the poller or the scanner was terminated you should clear the mac_track_processes table by hand.

Clear mac addresses

To clear the mac addresses from Cacti you should TRUNCATE the mac_track_ports table.

Duplicate device bug

When editing a device from Cacti you should check mac_track_devices table. Sometimes it makes a duplicate entry. Simply delete the old one.


Copyright (c) 2004-2026 - The Cacti Group, Inc.