hrw4u: Fix u4wrh cidr() emitting 1-arg form missing IPv6 bits#13205
Open
Clendenin wants to merge 1 commit into
Open
hrw4u: Fix u4wrh cidr() emitting 1-arg form missing IPv6 bits#13205Clendenin wants to merge 1 commit into
Clendenin wants to merge 1 commit into
Conversation
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.
e54f88e to
8ad9807
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
HRW
%{CIDR:a}supplies only IPv4 bits and relies on implicit IPv6 defaults,while Prism
cidr()requires bothipv4_bitsandipv6_bits. When u4wrh seesthe 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 sothe forward round-trip satisfies the 2-arg signature.