Re: [Openvpn-devel] [PATCH] Fix M_ERRNO behavior on Windows

2022-05-03 Thread Lev Stipakov
Hi, Also there are some places openvpn_errno() is used and the result checked > against POSIX error codes: > in forward.c around line 2102: > > if ( && ENETUNREACH == error_code && ...) > > where error_code = openvpn_errno() which may return WSAENETUNREACH on > Windows not ENETUNREACH-- even t

Re: [Openvpn-devel] [PATCH] Fix M_ERRNO behavior on Windows

2022-04-22 Thread Selva Nair
Hi, Sorry for the long delay in getting back to this.. On Tue, Feb 22, 2022 at 9:13 AM Lev Stipakov wrote: > From: Lev Stipakov > > We use M_ERRNO flag in logging to display error code > and error message. This has been broken on Windows, > where we use error code from GetLastError() and > err

[Openvpn-devel] [PATCH] Fix M_ERRNO behavior on Windows

2022-02-22 Thread Lev Stipakov
From: Lev Stipakov We use M_ERRNO flag in logging to display error code and error message. This has been broken on Windows, where we use error code from GetLastError() and error description from strerror(). strerror() expects C runtime error code, which is quite different from last error code fro