mirror of
https://github.com/OpenVPN/openvpn3.git
synced 2024-09-19 19:52:15 +02:00
dco-win: pass mss to kernel
Pass mss_fix value to dco-win driver via set_peer call. Signed-off-by: Lev Stipakov <lev@openvpn.net>
This commit is contained in:
parent
2b7f97c78b
commit
3d662431fa
@ -608,6 +608,9 @@ namespace openvpn {
|
||||
// initialize data channel after pushed options have been processed
|
||||
Base::init_data_channel();
|
||||
|
||||
// we got pushed options and initializated crypto - now we can push mss to dco
|
||||
tun->adjust_mss(conf().mss_fix);
|
||||
|
||||
// Allow ProtoContext to suggest an alignment adjustment
|
||||
// hint for transport layer.
|
||||
transport->reset_align_adjust(Base::align_adjust_hint());
|
||||
|
@ -85,6 +85,12 @@ public:
|
||||
|
||||
std::string tun_name() const override { return "ovpn-dco-win"; }
|
||||
|
||||
void adjust_mss(int mss) override
|
||||
{
|
||||
OVPN_SET_PEER peer {-1, -1, mss};
|
||||
dco_ioctl_(OVPN_IOCTL_SET_PEER, &peer, sizeof(peer));
|
||||
}
|
||||
|
||||
IP::Addr server_endpoint_addr() const override {
|
||||
return IP::Addr::from_asio(endpoint_.address());
|
||||
}
|
||||
|
@ -52,6 +52,8 @@ namespace openvpn {
|
||||
|
||||
virtual std::string vpn_gw4() const { return std::string(); } // VPN gateways
|
||||
virtual std::string vpn_gw6() const { return std::string(); }
|
||||
|
||||
virtual void adjust_mss(int mss) {};
|
||||
};
|
||||
|
||||
// Base class for parent of tun interface object, used to
|
||||
|
Loading…
Reference in New Issue
Block a user