mirror of
https://github.com/deneraraujo/OpenVPNAdapter.git
synced 2026-04-24 00:00:05 +08:00
Squashed 'Sources/OpenVPNAdapter/Libraries/Vendors/openvpn/' changes from 6608878d5..934f4e741
934f4e741 Merge remote-tracking branch 'origin/qa' 8c87c7696 [UCONNECT-1027] use proper io_context when initializing AsyncResolve class c3026c65a Merge remote-tracking branch 'origin/qa' f33fe7665 [UCONNECT-1027] perform async DNS resolution in a detached thread 0c0af6781 [OVPN3-342] Generate ICMP "packet too big" reply c93af60a7 Move files from ovpn3-common to openvpn3 repo d5eeb78ed ClientAPI: print core version when starting 04de9c425 Merge branch 'qa' 2c0dbc6c3 buildep.py: add asio patching 600c68012 Allow updating auth-token during session 7391096b9 [OC-85] tunprop: exclude routes for additional remotes also on macOS 3587628d7 [OC-84] tunprop: exclude routes for additional remotes also on Windows 25471635d Revert "[UCONNECT-868] When no network is present pause instead of stopping" 5713ff34a Fixed some breakage caused by recent endian/ffs commits a9ce44a22 endian.hpp: break out endian compile-time tests to endian_platform.hpp 72181f9e7 [UCONNECT-868] When no network is present pause instead of stopping 10d636cfe version: switch to 3.2 git-subtree-dir: Sources/OpenVPNAdapter/Libraries/Vendors/openvpn git-subtree-split: 934f4e741f760160dc65a6f4b29af57bb5be8f93
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
#include <openvpn/common/count.hpp>
|
||||
#include <openvpn/common/string.hpp>
|
||||
#include <openvpn/common/base64.hpp>
|
||||
#include <openvpn/ip/ptb.hpp>
|
||||
#include <openvpn/tun/client/tunbase.hpp>
|
||||
#include <openvpn/transport/client/transbase.hpp>
|
||||
#include <openvpn/transport/client/relay.hpp>
|
||||
@@ -376,15 +377,24 @@ namespace openvpn {
|
||||
// encrypt packet
|
||||
if (buf.size())
|
||||
{
|
||||
Base::data_encrypt(buf);
|
||||
if (buf.size())
|
||||
const ProtoContext::Config& c = Base::conf();
|
||||
if (c.mss_inter > 0 && buf.size() > c.mss_inter)
|
||||
{
|
||||
// send packet via transport to destination
|
||||
OPENVPN_LOG_CLIPROTO("Transport SEND " << server_endpoint_render() << ' ' << Base::dump_packet(buf));
|
||||
if (transport->transport_send(buf))
|
||||
Base::update_last_sent();
|
||||
else if (halt)
|
||||
return;
|
||||
Ptb::generate_icmp_ptb(buf, c.mss_inter);
|
||||
tun->tun_send(buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
Base::data_encrypt(buf);
|
||||
if (buf.size())
|
||||
{
|
||||
// send packet via transport to destination
|
||||
OPENVPN_LOG_CLIPROTO("Transport SEND " << server_endpoint_render() << ' ' << Base::dump_packet(buf));
|
||||
if (transport->transport_send(buf))
|
||||
Base::update_last_sent();
|
||||
else if (halt)
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user