Created a lightweight abstraction layer so that another i/o
reactor can be dropped in place of asio.
This commit includes:
* Added ASIO=1 to many "go" scripts that require asio
* Renamed "asio::" to "openvpn_io::".
Signed-off-by: James Yonan <james@openvpn.net>
Alt Routing allows services on meshed PG nodes to communicate
with services on other nodes via the secure mesh, and without
requiring SSL.
Signed-off-by: James Yonan <james@openvpn.net>
Created a lightweight abstraction layer so that another i/o
reactor can be dropped in place of asio.
This commit includes:
* Added ASIO=1 to many "go" scripts that require asio
* Renamed "asio::" to "openvpn_io::".
Signed-off-by: James Yonan <james@openvpn.net>
Errors fixed from gcc:
openvpn/openssl/pki/extpki.hpp: In static member function ‘static ECDSA_SIG* openvpn::ExternalPKIECImpl::ecdsa_sign_sig(const unsigned char*, int, const BIGNUM*, const BIGNUM*, EC_KEY*)’:
openvpn/openssl/pki/extpki.hpp:366:11: warning: variable ‘out’ set but not used [-Wunused-but-set-variable]
From Converity scan:
>>> CID 351295: Null pointer dereferences (REVERSE_INULL)
>>> Null-checking "rsa_meth" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
117 if (rsa_meth)
118 RSA_meth_free(rsa_meth);
119 }
Remove also check from sigout.size() > siglen. The buffer will throw an
exception if the decoded bytes do not fit.
When configuring net30 topology (TAP_WIN_IOCTL_CONFIG_POINT_TO_POINT),
remote value is calculated based on assumption that local address is
network + 2 and remote is network + 1. This holds for openvpn 2.4:
ifconfig 10.8.0.6 10.8.0.5
local 10.8.0.6
network = local & 255.255.255.252 = 10.8.0.4
remote = network + 1 = 10.8.0.5
But this doesn't hold when using VPN server by vpngate:
ifconfig 10.211.1.73 10.211.1.74
local 10.211.1.73
network = local & 255.255.255.252 = 10.211.1.72
remote = network + 1 = 10.211.1.73
Remote is same as local.
To fix, use openvpn2's approach - don't do any assumptions
and use ipconfig's second option as remote value.
Fixes https://github.com/OpenVPN/openvpn3/issues/95 (broken connection to vpngate)
Reported-by: Serathin <https://github.com/Serathin>
Signed-off-by: Lev Stipakov <lev@openvpn.net>
- use explicit for non copy single argument constructor
- add override where applicable
Signed-off-by: Arne Schwabe <arne@openvpn.net>
Signed-off-by: David Sommerseth <davids@openvpn.net>
The name add_exclude_route is extremely confusing in this context as
it implies that the function only adds exclude routes and not include
routes.
Signed-off-by: Arne Schwabe <arne@openvpn.net>
This allows to include/use this file when the other dependencies of
kodev.hpp are not yet declared. (E.g. logging)
Signed-off-by: Arne Schwabe <arne@openvpn.net>
As documentation says:
> If lpOverlapped is NULL, lpBytesReturned cannot be NULL
While on Windows 10 passing NULL works by accident,
on Windows 7 it crashes.
Signed-off-by: Lev Stipakov <lev@openvpn.net>
(cherry picked from commit 11d705d2c7)