Skip to content

Accept IPv4 dotted-decimal tails in IPv6 address parsing #549

Closed

Description

@LunaStev

ipv6_parse only accepts hexadecimal digits and colon separators. Its inner group loop passes each byte to _ipv6_hex_value, so the first dot rejects a mixed IPv6 address such as ::ffff:192.0.2.1. This is an existing IPv6 text form and is useful when accepting IPv4-mapped addresses from configuration or logs.

This request extends the address parser within the current networking API; it does not add DNS resolution or change Wave language syntax.

Code evidence:

Acceptance:

  • Parse a final dotted-decimal IPv4 component as the last 32 bits, with and without preceding :: compression.
  • Verify ::ffff:192.0.2.1 produces the same octets as ::ffff:c000:201, and cover an uncompressed mixed form.
  • Reject missing/excess octets, values above 255, a dotted component before the final position, excess total groups and repeated compression.
  • Preserve hexadecimal-only parsing and formatter round trips without delegating parsing to libc.

Reference: IPv6 text representations, RFC 4291 section 2.2. Existing address examples cover hexadecimal forms, not this supported IP notation.

Audit status: static source inspection against canonical master ea74c2dafc31da876e5561f2d176ba719f5a0458 on 2026-09-10. No compiler build, test execution, implementation change or local reproduction was performed for this report. The examples describe the source-derived behavior to verify when implementing the fix.

Activity

  1. added
    enhancement
    help wanted
    cross-platform
    on Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cross-platformenhancementhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions