charon-nm: Add support for custom server ports

This commit is contained in:
Tobias Brunner
2020-02-14 13:36:16 +01:00
parent eb256e5ba1
commit 60777574c1
+5
View File
@@ -447,6 +447,11 @@ static gboolean connect_(NMVpnServicePlugin *plugin, NMConnection *connection,
"Gateway address missing.");
return FALSE;
}
str = nm_setting_vpn_get_data_item(vpn, "server-port");
if (str && strlen(str))
{
ike.remote_port = settings_value_as_int((char*)str, ike.remote_port);
}
str = nm_setting_vpn_get_data_item(vpn, "virtual");
virtual = streq(str, "yes");
str = nm_setting_vpn_get_data_item(vpn, "encap");