feat(amt-scan): cap concurrency on AMT LAN probe (VS-11) #18

Merged
David merged 2 commits from feat/amt-lan-probe-vs-11 into main 2026-05-17 14:36:48 +02:00
Owner

Summary

scan_amt_devices was already a real TCP-connect sweep against AMT's well-known ports across the requested /24; the doc on ControlIn::ScanAmtDevice was stale and the function was unbounded in concurrency. AMT firmware does not actually reply to a pure UDP discovery datagram (it returns ICMP-unreachable), so TCP-connect is the correct probe.

Changes

  • 256-permit tokio::sync::Semaphore caps in-flight connects.
  • 60s overall ceiling bounds the sweep against a slow / lossy LAN.
  • Refreshed doc comment on the enum variant and the function.

Test plan

  • cargo check -p meshcentral-web clean.
  • Reviewer: confirm the SPA's "Scan for AMT devices" button returns the expected list against a /24 containing a known-AMT host.

Closes VS-11.

## Summary `scan_amt_devices` was already a real TCP-connect sweep against AMT's well-known ports across the requested /24; the doc on `ControlIn::ScanAmtDevice` was stale and the function was unbounded in concurrency. AMT firmware does not actually reply to a pure UDP discovery datagram (it returns ICMP-unreachable), so TCP-connect is the correct probe. ## Changes - 256-permit `tokio::sync::Semaphore` caps in-flight connects. - 60s overall ceiling bounds the sweep against a slow / lossy LAN. - Refreshed doc comment on the enum variant and the function. ## Test plan - [x] `cargo check -p meshcentral-web` clean. - [ ] Reviewer: confirm the SPA's "Scan for AMT devices" button returns the expected list against a `/24` containing a known-AMT host. Closes VS-11.
feat(amt-scan): cap concurrency + overall timeout on AMT LAN probe (VS-11)
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 1m37s
8b2f09e66b
`scan_amt_devices` was already a real TCP-connect sweep across the AMT well-known ports (16992-16995) on the requested /24, but the stale serde doc on `ControlIn::ScanAmtDevice` still said "stub returns empty list" and the inner function had no upper bound on in-flight connects. Against a /24 with 254 simultaneous targets the per-process fd table would briefly spike above 1000.

Adds a 256-permit `tokio::sync::Semaphore` to cap concurrent connects, plus a 60s overall ceiling so a slow / lossy network can't pin the dispatcher indefinitely. Refreshes the doc comment on the enum variant and the function so the next ROADMAP scan does not refile this.

#VS-11 State Done
Merge branch 'main' into feat/amt-lan-probe-vs-11
Some checks failed
Create release / Create release from merged PR (pull_request) Has been skipped
Check / fmt + clippy + build + tests (pull_request) Failing after 13s
3c2061f345
David merged commit 85c3b78646 into main 2026-05-17 14:36:48 +02:00
David deleted branch feat/amt-lan-probe-vs-11 2026-05-17 14:36:49 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/vervain-server!18
No description provided.