Skip to content

Make IP address validation lazier#668

Merged
mkeeter merged 2 commits into
masterfrom
mkeeter/lazy-ip-address
May 21, 2026
Merged

Make IP address validation lazier#668
mkeeter merged 2 commits into
masterfrom
mkeeter/lazy-ip-address

Conversation

@mkeeter
Copy link
Copy Markdown
Contributor

@mkeeter mkeeter commented May 15, 2026

(Staged on #666)

This PR makes validation of the --ip argument lazier: we now store a Result<ScopedV6Addr, ScopedV6AddrError>, and only require it to be valid when it's actually used.

Fixes #609

@mkeeter mkeeter requested review from hawkw and labbott May 15, 2026 16:12
Copy link
Copy Markdown
Contributor

@labbott labbott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, you may want reviews from those who might have strong opinions about thiserror shaped things

@mkeeter mkeeter force-pushed the mkeeter/lazy-ip-address branch from 0703187 to 9bee966 Compare May 18, 2026 19:30
@mkeeter mkeeter force-pushed the mkeeter/subcommand-enum branch 2 times, most recently from 914a821 to 8bc7cfb Compare May 18, 2026 19:53
@mkeeter mkeeter force-pushed the mkeeter/lazy-ip-address branch from 9bee966 to 5be72a2 Compare May 18, 2026 19:53
@mkeeter mkeeter force-pushed the mkeeter/subcommand-enum branch from 8bc7cfb to 9b7da57 Compare May 18, 2026 20:21
@mkeeter mkeeter force-pushed the mkeeter/lazy-ip-address branch 2 times, most recently from 3d3115f to 39bea87 Compare May 18, 2026 20:54
@mkeeter mkeeter force-pushed the mkeeter/subcommand-enum branch from 9b7da57 to 1cefecd Compare May 18, 2026 20:54
@mkeeter mkeeter force-pushed the mkeeter/lazy-ip-address branch from 39bea87 to 8e6b788 Compare May 20, 2026 19:40
@mkeeter mkeeter force-pushed the mkeeter/subcommand-enum branch from 1cefecd to 9474cbb Compare May 20, 2026 19:40
@mkeeter mkeeter force-pushed the mkeeter/lazy-ip-address branch from 8e6b788 to 925eafc Compare May 20, 2026 20:09
@mkeeter mkeeter force-pushed the mkeeter/subcommand-enum branch 2 times, most recently from 8c8ab59 to d462926 Compare May 20, 2026 20:45
@mkeeter mkeeter force-pushed the mkeeter/lazy-ip-address branch from 925eafc to 1d1f33d Compare May 20, 2026 20:45
@mkeeter mkeeter force-pushed the mkeeter/subcommand-enum branch from d462926 to 9029fba Compare May 20, 2026 23:03
@mkeeter mkeeter force-pushed the mkeeter/lazy-ip-address branch 2 times, most recently from 03a5bbb to 9f8f18d Compare May 21, 2026 13:45
@mkeeter mkeeter force-pushed the mkeeter/subcommand-enum branch from 9029fba to 5aabda9 Compare May 21, 2026 13:45
@mkeeter mkeeter force-pushed the mkeeter/lazy-ip-address branch from 9f8f18d to a375ce8 Compare May 21, 2026 14:09
@mkeeter mkeeter force-pushed the mkeeter/subcommand-enum branch 2 times, most recently from 282a801 to 7cf583b Compare May 21, 2026 14:24
@mkeeter mkeeter force-pushed the mkeeter/lazy-ip-address branch from a375ce8 to 1279680 Compare May 21, 2026 14:24
@mkeeter mkeeter force-pushed the mkeeter/subcommand-enum branch from 7cf583b to 482e78f Compare May 21, 2026 14:37
@mkeeter mkeeter force-pushed the mkeeter/lazy-ip-address branch 2 times, most recently from 6920a46 to 2b344f4 Compare May 21, 2026 15:49
@mkeeter mkeeter force-pushed the mkeeter/subcommand-enum branch 2 times, most recently from 7c8ea72 to f92f5e5 Compare May 21, 2026 16:45
@mkeeter mkeeter force-pushed the mkeeter/lazy-ip-address branch 2 times, most recently from 92379ad to d34127f Compare May 21, 2026 17:31
@mkeeter mkeeter force-pushed the mkeeter/subcommand-enum branch from f92f5e5 to 01d62d8 Compare May 21, 2026 17:31
@mkeeter mkeeter force-pushed the mkeeter/lazy-ip-address branch from d34127f to 387fdb4 Compare May 21, 2026 17:52
@mkeeter mkeeter force-pushed the mkeeter/subcommand-enum branch from 01d62d8 to 4c980ca Compare May 21, 2026 17:52
@mkeeter mkeeter force-pushed the mkeeter/lazy-ip-address branch from 387fdb4 to 6bfe5b7 Compare May 21, 2026 18:22
@mkeeter mkeeter force-pushed the mkeeter/subcommand-enum branch from 4c980ca to 4665ca1 Compare May 21, 2026 18:22
@mkeeter mkeeter force-pushed the mkeeter/lazy-ip-address branch from 6bfe5b7 to ad7f519 Compare May 21, 2026 18:45
@mkeeter mkeeter changed the base branch from mkeeter/subcommand-enum to master May 21, 2026 18:45
@mkeeter mkeeter force-pushed the mkeeter/lazy-ip-address branch from ad7f519 to 8e75f81 Compare May 21, 2026 18:52
@mkeeter mkeeter merged commit 7e99b46 into master May 21, 2026
12 checks passed
@mkeeter mkeeter deleted the mkeeter/lazy-ip-address branch May 21, 2026 20:01
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.

--ip causes early failures even when it doesn't matter

2 participants