Hi,

On Mon, Dec 16, 2024 at 01:22:38PM +0100, corubba via Openvpn-devel wrote:
> Before passing IPv4-mapped IPv6 addresses to the proxy journal,
> translate them to plain IPv4 addresses. Whether the connection was
> accepted by OpenVPN on a "dual stack" socket is of no importance to the
> proxy receiver.
> 
> Signed-off-by: Corubba Smith <coru...@gmx.de>

I'm fine with the idea, but I do not like the implementation with 
"yet another localized sockaddr manipulation function" - we already
have similar code in socket.c/setenv_sockaddr(), so maybe we need
to make this a more general thing.

print_openvpn_sockaddr() is just a wrapper around print_sockaddr_ex(),
which takes flags.  So we could introduce something like a PS_NO_V4MAPPED
(naming is hard :-) ) which would then do "this" inside print_sockaddr_ex().

It's not fully straightforward, though (it operates on a pointer passed
to it, so we'd need to have a local sockaddr_in for "unmapped v4" then).

Mmmmh, need to think more about this.

gert

-- 
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             g...@greenie.muc.de

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to