Am 13.09.20 um 16:56 schrieb Gert Doering:
> Our ROUNDUP() macro to achieve the required system-specific alignment
> for data structures sent to the routing socket was wrong for NetBSD -
> unlike OpenBSD/FreeBSD, NetBSD is not using "long" (32/64 bit depending
> on OS architecture), and not "uint32_t" either (32/32) like MacOS, but
> uint64_t.
> 
> So our use of "long" always worked on NetBSD/amd64 and stopped working
> on NetBSD/i386 when this was changed on the OS side...
> 
> NetBSD conveniently exports a RT_ROUNDUP() macro from <net/route.h> - use
> that, and avoid trying to second-guess OS requirements.
> 
> While at it, add M_ERRNO to ominous "GDG6: problem writing to routing socket"
> error message to differenciate between "EINVAL" and other errors.

Have not tested it but looks sane and using OS code should be more sane
indeed.

Acked-By: Arne Schwabe <a...@rfc2549.org>

Arne

Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to