Skip to content

fix(scan): skip a local address another host uses, and warn about it - #279

Merged
ShortArrow merged 1 commit into
mainfrom
fix/vxi11-duplicate-address
Oct 16, 2026
Merged

ShortArrow merged 1 commit into
mainfrom
fix/vxi11-duplicate-address

Conversation

@ShortArrow

@ShortArrow ShortArrow commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

On Windows, visa scan probed 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 with AddressNotAvailable (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 --port socket sweep now skip an address the system will not send from. The address state comes from UnicastIPAddressInformation.DuplicateAddressDetectionState, and the new LocalAddresses in 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 scan printed the warning for the VXI-11 broadcast, and visa scan --port 5025 printed it for the sweep too, with no socket error.

@ShortArrow
ShortArrow marked this pull request as ready for review October 16, 2026 06:57
@ShortArrow
ShortArrow merged commit 6a92105 into main Oct 16, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant