vpninfo->ip_info.mtu = calculate_mtu(vpninfo, !no_esp_reason);
vpn_progress(vpninfo, PRG_ERR,
_("No MTU received. Calculated %d for %s%s\n"), vpninfo->ip_info.mtu,
- no_esp_reason ? "TLS tunnel. " : "ESP tunnel", no_esp_reason ? : "");
+ no_esp_reason ? "SSL tunnel. " : "ESP tunnel", no_esp_reason ? : "");
/* return -EINVAL; */
}
if (!vpninfo->ip_info.addr) {
.tcp_mainloop = cstp_mainloop,
.add_http_headers = cstp_common_headers,
.obtain_cookie = cstp_obtain_cookie,
+ .udp_protocol = "DTLS",
#ifdef HAVE_DTLS
.udp_setup = dtls_setup,
.udp_mainloop = dtls_mainloop,
.tcp_mainloop = oncp_mainloop,
.add_http_headers = oncp_common_headers,
.obtain_cookie = oncp_obtain_cookie,
+ .udp_protocol = "ESP",
#ifdef HAVE_ESP
.udp_setup = esp_setup,
.udp_mainloop = esp_mainloop,
.tcp_mainloop = gpst_mainloop,
.add_http_headers = gpst_common_headers,
.obtain_cookie = gpst_obtain_cookie,
+ .udp_protocol = "ESP",
#ifdef HAVE_ESP
.udp_setup = esp_setup,
.udp_mainloop = esp_mainloop,
char *urlpath = NULL;
struct oc_vpn_option *gai;
char *ip;
- const char *compr = "";
+ const char *ssl_compr, *udp_compr;
char *proxy = getenv("https_proxy");
char *vpnc_script = NULL;
const struct oc_ip_info *ip_info;
* reconnects end up in infinite loop trying to connect
* to non existing DTLS */
vpninfo->dtls_state = DTLS_DISABLED;
- fprintf(stderr, _("Set up DTLS failed; using SSL instead\n"));
+ fprintf(stderr, _("Set up UDP failed; using SSL instead\n"));
}
openconnect_get_ip_info(vpninfo, &ip_info, NULL, NULL);
- if (vpninfo->dtls_state != DTLS_CONNECTED) {
- if (vpninfo->cstp_compr == COMPR_DEFLATE)
- compr = " + deflate";
- else if (vpninfo->cstp_compr == COMPR_LZS)
- compr = " + lzs";
- else if (vpninfo->cstp_compr == COMPR_LZ4)
- compr = " + lz4";
- } else {
- if (vpninfo->dtls_compr == COMPR_DEFLATE)
- compr = " + deflate";
- else if (vpninfo->dtls_compr == COMPR_LZS)
- compr = " + lzs";
- else if (vpninfo->dtls_compr == COMPR_LZ4)
- compr = " + lz4";
- }
+ ssl_compr = openconnect_get_cstp_compression(vpninfo);
+ udp_compr = openconnect_get_dtls_compression(vpninfo);
vpn_progress(vpninfo, PRG_INFO,
- _("Connected as %s%s%s, using %s%s\n"),
+ _("Connected as %s%s%s, using SSL%s%s, with %s%s%s %s\n"),
ip_info->addr?:"",
(ip_info->netmask6 && ip_info->addr) ? " + " : "",
ip_info->netmask6 ? : "",
- (vpninfo->dtls_state != DTLS_CONNECTED) ? "SSL"
- : "DTLS", compr);
+ ssl_compr ? " + " : "", ssl_compr ? : "",
+ vpninfo->proto->udp_protocol ? : "UDP", udp_compr ? " + " : "", udp_compr ? : "",
+ (vpninfo->dtls_state == DTLS_DISABLED || vpninfo->dtls_state == DTLS_NOSECRET ? _("disabled") : _("in progress")));
if (!vpninfo->vpnc_script) {
vpn_progress(vpninfo, PRG_INFO,