Skip to content

v1.16.1

Choose a tag to compare

@gsjonio gsjonio released this 12 Jul 23:17

Resolution caching and parser fuzzing, over v1.16.0. Patch bump: transparent internal changes, output unchanged.

Install

go install github.com/gsjonio/netwp/cmd/netwp@v1.16.1

Already have netwp? netwp update.

Performance

  • Hostname resolution is cached per IP (5 min). The monitor/dashboard re-scans every 10-15s and used to re-resolve every device from scratch each time (reverse DNS, then an mDNS + NetBIOS race). Unresolved devices, the common case, paid that full race on every scan. Now a repeat scan serves names from memory.
  • The mDNS service sweep is cached the same way. It fires 12 multicast queries and listens ~1.2s; re-running it every scan was wasteful multicast traffic for data that rarely changes.

Hardening

  • Fuzz tests for the DNS/mDNS/ARP wire parsers (readName, parsePTRAnswer, ptrServiceLabels, parseARPReply), which consume bytes off the network from untrusted hosts. Ran 1M+ executions locally with no crash; the parsers were already defensive. A short fuzzing pass now runs in CI on every push, alongside the race detector added in v1.14.1.