Hi,

reading through Frank's review bits, I found something...

On Tue, Apr 12, 2022 at 12:33:50PM +0200, Frank Lichtenheld wrote:
> > +struct sockaddr *
> > +mapped_v4_to_v6(struct sockaddr *sock, struct gc_arena *gc)
> > +{
> > +    struct sockaddr_in6 *sock6 = ((struct sockaddr_in6 *)sock);
> > +    if (sock->sa_family == AF_INET6
> > +        && memcmp(&sock6->sin6_addr, 
> > "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff", 12)==0)
> 
> magic constant?

Yes.  This should use IN6_IS_ADDR_V4MAPPED(), as we already do in
other places (= we know that macro is universally available and works
with our constructs).

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