mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-05-20 07:26:58 -04:00
Add mtu option
This commit is contained in:
@@ -63,6 +63,7 @@ int vpn_connect(const vpn_options *options, vpn_connected_callback callback)
|
||||
INFO("OS: %s", options->os);
|
||||
INFO("CSD_USER: %d", options->csd_uid);
|
||||
INFO("CSD_WRAPPER: %s", options->csd_wrapper);
|
||||
INFO("MTU: %d", options->mtu);
|
||||
|
||||
vpninfo = openconnect_vpninfo_new(options->user_agent, validate_peer_cert, NULL, NULL, print_progress, NULL);
|
||||
|
||||
@@ -97,6 +98,11 @@ int vpn_connect(const vpn_options *options, vpn_connected_callback callback)
|
||||
openconnect_setup_csd(vpninfo, options->csd_uid, 1, options->csd_wrapper);
|
||||
}
|
||||
|
||||
if (options->mtu > 0) {
|
||||
int mtu = options->mtu < 576 ? 576 : options->mtu;
|
||||
openconnect_set_reqmtu(vpninfo, mtu);
|
||||
}
|
||||
|
||||
g_cmd_pipe_fd = openconnect_setup_cmd_pipe(vpninfo);
|
||||
if (g_cmd_pipe_fd < 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user