Skip to content

2026-10-01

Choose a tag to compare

@github-actions github-actions released this 01 Oct 22:26
· 9 commits to main since this release
Validate IP answer flag values

Summary:
The shared parser behind `-ip` and `-ipwithmaxans` could store invalid addresses under `<nil>` and terminate the process with `glog.Fatalf` when a max-answer value was not numeric. Invalid flag values now return ordinary parsing errors without mutating `IPAns`.

- Reject invalid IPs, malformed `IP,maxAns` tuples, and nonpositive or nonnumeric counts.
- Preserve default-count and canonical-IP behavior for valid IPv4 and IPv6 input.
- Render `ipAns.String` as sorted, space-separated `IP,maxAns` entries without empty fields or trailing punctuation.

Reviewed By: bemasc

Differential Revision: D122468457

fbshipit-source-id: 9da1d48acc441a2e641fcf4389e7abaa5fdf2f3c