Skip to content

fix(snmp): accept IPv6 TargetIP on Invoke-SnmpWalk - #78

Merged
jacobyoby merged 1 commit into
mainfrom
cursor/snmpwalk-ipv6-target-ff9e
Sep 9, 2026
Merged

jacobyoby merged 1 commit into
mainfrom
cursor/snmpwalk-ipv6-target-ff9e

Conversation

@jacobyoby

@jacobyoby jacobyoby commented Sep 9, 2026 •

Copy link
Copy Markdown
Owner

Closes #73.

Problem

Invoke-SnmpWalk TargetIP ValidateScript was IPv4/FQDN-only, so dual-stack SNMP targets failed before the walk — blocking post-#56/#57 IPv6 neighbors.

Change

  • Accept IPv4 and IPv6 literals via [System.Net.IPAddress]::TryParse (same parse path as inventory helpers).
  • Hostnames/FQDNs remain accepted.
  • Dash-prefix injection guard unchanged.
  • Garbage input still throws a clear validation error.
  • Pester: IPv6 accepted, IPv4 still accepted, invalid rejected (binary mocked; no live SNMP).
  • CHANGELOG [Unreleased] bullet.

Out of scope

Credential-map IPv6 CIDR keys, CI smoke, Gallery release, MCP, live SNMP integration tests.

Verification

./tests/run-tests.sh (pwsh/Pester only). 157 tests passed, 0 failed. Touched tests are Invoke-SnmpWalk parameter validation.

Open in Web Open in Cursor 

ValidateScript was IPv4/FQDN-only, so dual-stack SNMP targets failed
before the walk. Parse IPv4/IPv6 with IPAddress.TryParse; keep FQDN
acceptance and a clear error on garbage input.

Closes #73.

Co-authored-by: Jacobrakai <jacobyoby@users.noreply.github.com>
@jacobyoby
jacobyoby marked this pull request as ready for review September 9, 2026 20:16
@jacobyoby
jacobyoby merged commit 908af22 into main Sep 9, 2026
7 checks passed
@cursor
cursor Bot deleted the cursor/snmpwalk-ipv6-target-ff9e branch September 19, 2026 18:20
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.

Invoke-SnmpWalk: accept IPv6 TargetIP

2 participants