Repository navigation
Show adapter IPv4 addresses - #41
Conversation
Walk FirstUnicastAddress and keep only AF_INET. A failed query stays Unknown, and an adapter with no IPv4 stays "-". Co-authored-by: JamesLinYJ <JamesLinYJ@users.noreply.github.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0bc03a3472
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| let ipv4_query = query_unicast_ipv4_by_index(); | ||
| let ipv4_error = ipv4_query.as_ref().err().copied(); | ||
| let ipv4_map = ipv4_query.ok(); |
There was a problem hiding this comment.
Preserve IPv4 data when the address query fails
When GetAdaptersAddresses fails—for example after repeated buffer-overflow races during adapter changes—converting the result with .ok() still commits the sample, so ipv4_label replaces every previously valid address with Unknown. Keep the last trusted snapshot (or otherwise preserve and visibly mark the IPv4 data as stale) instead of overwriting it on this global query failure.
AGENTS.md reference: AGENTS.md:L42-L42
Useful? React with 👍 / 👎.
Summary
GetAdaptersAddressesand walksFirstUnicastAddress, keeping onlyAF_INET.0.0.0.0is not shown.-.Verification
0.0.0.0being dropped, and two IPv4 addresses being joined.cargo checkandcargo clippy -D warningspassed forx86_64-pc-windows-msvcon this machine. Windows CI still compiles the resources and runs the full matrix.