Repository navigation
feat(nmap): Import-NmapScan IPv6 hosts (#63) - #69
Merged
Merged
Conversation
Accept addrtype=ipv6 when a host has no IPv4 address. Dual-stack hosts keep a single node identity by preferring IPv4. Add fixture coverage and document the preference in help, README, and changelog. Co-authored-by: Jacobrakai <jacobyoby@users.noreply.github.com>
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.
Closes #63.
Import-NmapScanpreviously ignored every nmapaddressthat was notaddrtype='ipv4', so IPv6-only and dual-stack-oXscans dropped live hosts.Approach (single-node identity): one topology node per nmap host. Prefer IPv4 when both families are present; emit IPv6 only when no IPv4 address is on that host. Addresses are validated with
[System.Net.IPAddress]::Parseand stored in canonical form. Malformed addresses are skipped, matching the existing invalid-IPv4 behavior.Changes
addrtype='ipv6'when no IPv4 address is presenttests/fixtures/nmap-sample-ipv6.xmlplus Pester coverageTests
192.168.1.99dropped2001:db8::10imported192.168.1.30, not2001:db8::30not-an-ipskippedGet-Help Import-NmapScanDESCRIPTION mentions IPv4 and IPv6Do not merge.