Skip to content

hrw4u: Fix u4wrh cidr() emitting 1-arg form missing IPv6 bits#13205

Open
Clendenin wants to merge 1 commit into
apache:masterfrom
Clendenin:bugfix/u4wrh-cidr-arity
Open

hrw4u: Fix u4wrh cidr() emitting 1-arg form missing IPv6 bits#13205
Clendenin wants to merge 1 commit into
apache:masterfrom
Clendenin:bugfix/u4wrh-cidr-arity

Conversation

@Clendenin
Copy link
Copy Markdown
Contributor

Summary

HRW %{CIDR:a} supplies only IPv4 bits and relies on implicit IPv6 defaults,
while Prism cidr() requires both ipv4_bits and ipv6_bits. When u4wrh sees
the single value form, pad with the canonical HRW IPv6 default (48) so the
emitted Prism has valid arity and round-trips stably.

This change also extends the CIDR reverse branch to handle the bare %{CIDR}
no-payload form, padding to cidr(24, 48) using HRW's canonical defaults so
the forward round-trip satisfies the 2-arg signature.

HRW %{CIDR:a} supplies only IPv4 bits and relies on implicit IPv6 defaults,
while HRW4U cidr() requires both ipv4_bits and ipv6_bits. When u4wrh sees
the single value form, pad with the canonical HRW IPv6 default (48) so the
emitted HRW4U has valid arity and round-trips stably.

Extends the CIDR reverse branch to handle the bare %{CIDR} no-payload form,
padding to cidr(24, 48) using HRW's canonical defaults so the forward
round-trip satisfies the 2-arg signature.
@Clendenin Clendenin force-pushed the bugfix/u4wrh-cidr-arity branch from e54f88e to 8ad9807 Compare May 27, 2026 23:19
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.

1 participant