Repository navigation
fix(mactrack): small fixes to removal, stale processes, MAC actions and DNS settings - #421
Merged
Merged
Conversation
api_mactrack_device_remove() and api_mactrack_site_remove() concatenated the id into each DELETE; bind it instead and drop the repeated mac_track_processes delete. Fixes #288 Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
clear_old_processes() deleted each entry by process_id, so an entry with no PID also removed every other entry still waiting for one. Delete the rows it found by device_id, the table key, in one statement. Fixes #295 Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Fixes #292 Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Reject a primary or secondary DNS server that is not empty or an IP address when the settings are saved, and allow IPv6-length values. Fixes #285 Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Covers this branch and the xform_net_address() and device export branches, so only one pull request in the batch edits the CHANGELOG. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Copy the function into a temporary file and require it, so the tests no longer run code through eval(). Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
|
TheWitness
approved these changes
Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Six small fixes from the issue list, one commit each. Device and site removal now bind the id instead of concatenating it. The stale-process sweep deletes the rows it found in one statement keyed on
device_id, so an entry without a PID no longer takes every other PID-less entry with it, and the age check spares an entry that was re-queued in the meantime. The MAC report tells you when none of the selected addresses was valid, looks up a revoke selection in one query, and raises the group-authorization warning throughraise_message()so it is actually shown. The interfaces report comparessite_idwith'-1'like the other reports. The DNS server settings reject anything that is not empty or an IP address, using the settingsfilterkey (Cacti 1.2.16 and later), and accept IPv6-length values.The CHANGELOG commit also carries the entries for #419 and #420, so only one PR in this batch edits the file. If either of those is closed, its entry should come out.
Tests cover the bound deletes, the single stale-process delete and the DNS filter; they fail on develop and pass here. The raw-SQL ratchet for
mactrack_actions.phpdrops from 19 to 0.Fixes #285
Fixes #288
Fixes #290
Fixes #292
Fixes #293
Fixes #295