Repository navigation
fix(scan): skip a local address another host uses, and warn about it - #279
Merged
Merged
Conversation
ShortArrow
marked this pull request as ready for review
October 16, 2026 06:57
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.
On Windows,
visa scanprobed every local IPv4 address on an interface that is up, including one whose duplicate address detection had failed because another host on the network uses it. The system will not send from such an address, so the VXI-11 broadcast's bind failed withAddressNotAvailable(10049). The scanner caught it and logged it at debug level with a stack trace, so the user saw nothing without--verbose. Even then the trace did not say what was wrong: no instrument on that network can be reached from the machine until the address changes.What changes
The VXI-11 broadcast and the
--portsocket sweep now skip an address the system will not send from. The address state comes fromUnicastIPAddressInformation.DuplicateAddressDetectionState, and the newLocalAddressesin the Application layer gives both scanners the same rule. Preferred and Deprecated addresses are probed; Duplicate, Tentative and Invalid ones are not. A duplicate is a warning that names the address and the interface, and shows without--verbose. Any other skipped state is a debug line, since the check is still running.The check runs after the existing interface filter, so an interface that is down or a loopback interface logs nothing.
Only Windows reports the detection state. On Linux and macOS every address counts as usable and the scan behaves as before. ADR 0008 records the rule.
How it was checked
Unit tests pin the rule for each detection state and for a platform that does not report one. On a Windows machine with a duplicate address,
visa scanprinted the warning for the VXI-11 broadcast, andvisa scan --port 5025printed it for the sweep too, with no socket error.