Skip to content

peer: parsing a zoneid as number fix - #23060

Closed
icing wants to merge 5 commits into
curl:masterfrom
icing:peer-scopeid-num-prefix-check
Closed

icing wants to merge 5 commits into
curl:masterfrom
icing:peer-scopeid-num-prefix-check

Conversation

@icing

@icing icing commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

When interpreting a zoneid as a numeric scopeid, check that the complete zoneid is numeric and not only has a number prefix.

reported-by: Joshua "The Hat" Rogers

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The regression tests can fail when the host has interfaces named tada or 123x.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Fixes IPv6 zone ID parsing so numeric scope IDs require an entirely numeric value.

Changes:

  • Require complete numeric zone ID parsing.
  • Add numeric and mixed zone ID regression tests.
File Review
tests/​unit/​unit2413.c Adds scope ID tests, but named-zone assertions are host-dependent and must account for if_nametoindex().
lib/​peer.c Validates the complete zone ID before assigning a numeric scope ID.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/unit/unit2413.c Outdated
@icing
icing force-pushed the peer-scopeid-num-prefix-check branch from c4c65a0 to 778bed3 Compare September 24, 2026 11:22
@bagder bagder closed this in 3b4f5bb Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants