Commit 04a8f801 authored by Daniel Lenski's avatar Daniel Lenski

send server's IP address, not DNS name, to TNCC script

We alread fixed this for CSD in 9b407667.
Signed-off-by: default avatarDaniel Lenski <dlenski@gmail.com>
parent 1f64056f
......@@ -530,7 +530,11 @@ static int tncc_preauth(struct openconnect_info *vpninfo)
goto out;
}
execl(vpninfo->csd_wrapper, vpninfo->csd_wrapper, vpninfo->hostname, NULL);
/* XX: openconnect_get_hostname actually returns IP address. IP is needed here because
* because the tunnel will be blocked while the script waits for its reply,
* so DNS may not be available.
*/
execl(vpninfo->csd_wrapper, vpninfo->csd_wrapper, openconnect_get_hostname(vpninfo), NULL);
out:
fprintf(stderr, _("Failed to exec TNCC script %s: %s\n"),
vpninfo->csd_wrapper, strerror(errno));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment