Hi, On Mon, Sep 03, 2012 at 08:49:42AM +0200, Arne Schwabe wrote: > Some BSD need the right salen, max(sizeof(v4),sizeof(v6)) does not work. > Since sa_len is not a member in sockaddr for Linux and Windows and SA_LEN is > no available on Darwin, NetBSD explicitly set salem
"Something sneaked into your keyboard"...
> + getnameinfo(&addr->addr.sa, sizeof (struct sockaddr_in6),
> + buf, sizeof (buf), NULL, 0,
> NI_NUMERICHOST);
... this very much looks like v1 of the patch...? :-)
Anyway, what about defining an openvpn_sa_len() macro that will either
use SA_LEN() if it exists, or fall back to
#define openvpn_sa_len(addr) ( addr->sa.sa_family == AF_INET? sizeof(struct
sockaddr_in) : sizeof(struct sockaddr_in6) )
this will, of course, bite us when we implement IPv8, but should be fine
for 2.3...
(Is there something magic in Autoconf to solve this? Must be a standard
problem...)
gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]
fax: +49-89-35655025 [email protected]
pgp8Yath5Pzz0.pgp
Description: PGP signature
