Skip to content

Conversation

bazsi
Copy link
Collaborator

@bazsi bazsi commented Oct 16, 2023

NOTE: this patch has been extracted from #4673

V4-mapped address space is a compatibility feature of dual-stack TCP/IP stacks, where IPv4 connections can be established to IPv6 capable sockets.

When this happens, the client IP address would be a V4-mapped address, as determined by the IN6_IS_ADDR_V4MAPPED() function, which is equivalent to an "::FFFF:" address (see RFC3493)

This change would trickle into how we fill $HOST if we didn't find a hostname there, previously these would have the form of "::FFFF:ipv4", with this one they would become "ipv4" just as if we received them using an ipv4 specific source.

@bazsi
Copy link
Collaborator Author

bazsi commented Oct 16, 2023

NOTE: there's a unit test in #4673 which needs to be updated if this goes in first or if this one gets rebased.

bazsi added 17 commits October 20, 2023 10:06
Add the possibility of adding a set of LM_V_XXXX handles that are allocated
at startup but not "static" in the sense that they are stored in the
NVTable as normal dynamic name-value pairs.

This mechanism replaces LOG_MSG_GET_VALUE_HANDLE_STATIC() macro and
is easier to read and avoids races.

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
…ndle

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
…Source

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
V4-mapped address space is a compatibility feature of dual-stack TCP/IP
stacks, where IPv4 connections can be established to IPv6 capable sockets.

When this happens, the client IP address would be a V4-mapped address,
as determined by the IN6_IS_ADDR_V4MAPPED() function, which
is equivalent to an "::FFFF:<ipv4>" address (see RFC3493)

This change would trickle into how we fill $HOST if we didn't find a
hostname there, previously these would have the form of "::FFFF:ipv4",
with this one they would become "ipv4" just as if we received them using
an ipv4 specific source.

Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
@bazsi bazsi force-pushed the fix-v4-mapped-afinet6-address-should-use-dot-notation branch from d3aaede to 196eb7b Compare October 20, 2023 08:26
@bazsi
Copy link
Collaborator Author

bazsi commented Oct 20, 2023

This should now work on MacOS too. I've rebased this against #4673 as the test to exercise this new behaviour in that branch.

Without the test change, this could be merged earlier than #4673 but I am keeping this as is for now.

@bazsi
Copy link
Collaborator Author

bazsi commented Oct 24, 2023

Closing, since this was separated from #4673 only because of the MacOS compatibility concern, which has been fixed.

I folded this back into #4673

@bazsi bazsi closed this Oct 24, 2023
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