mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 00:37:00 +08:00
Added X-CSTP-Default-Domain option.
This commit is contained in:
@@ -119,6 +119,9 @@ run-as-group = nogroup
|
|||||||
|
|
||||||
device = vpns
|
device = vpns
|
||||||
|
|
||||||
|
# The default domain to be advertised
|
||||||
|
default-domain = example.com
|
||||||
|
|
||||||
ipv4-network = 192.168.1.0
|
ipv4-network = 192.168.1.0
|
||||||
ipv4-netmask = 255.255.255.0
|
ipv4-netmask = 255.255.255.0
|
||||||
# Use the keywork local to advertize the local P-t-P address as DNS server
|
# Use the keywork local to advertize the local P-t-P address as DNS server
|
||||||
|
|||||||
@@ -169,6 +169,7 @@ unsigned j;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
READ_STRING("ca-cert", config->ca, 0);
|
READ_STRING("ca-cert", config->ca, 0);
|
||||||
|
READ_STRING("default-domain", config->default_domain, 0);
|
||||||
READ_STRING("crl", config->crl, 0);
|
READ_STRING("crl", config->crl, 0);
|
||||||
READ_STRING("cert-user-oid", config->cert_user_oid, 0);
|
READ_STRING("cert-user-oid", config->cert_user_oid, 0);
|
||||||
READ_STRING("cert-group-oid", config->cert_group_oid, 0);
|
READ_STRING("cert-group-oid", config->cert_group_oid, 0);
|
||||||
@@ -359,6 +360,7 @@ unsigned i;
|
|||||||
DEL(config->cert_hash);
|
DEL(config->cert_hash);
|
||||||
#endif
|
#endif
|
||||||
DEL(config->socket_file_prefix);
|
DEL(config->socket_file_prefix);
|
||||||
|
DEL(config->default_domain);
|
||||||
DEL(config->plain_passwd);
|
DEL(config->plain_passwd);
|
||||||
DEL(config->ocsp_response);
|
DEL(config->ocsp_response);
|
||||||
DEL(config->banner);
|
DEL(config->banner);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
*
|
*
|
||||||
* DO NOT EDIT THIS FILE (ocserv-args.c)
|
* DO NOT EDIT THIS FILE (ocserv-args.c)
|
||||||
*
|
*
|
||||||
* It has been AutoGen-ed April 29, 2013 at 02:14:53 PM by AutoGen 5.17.3
|
* It has been AutoGen-ed May 6, 2013 at 10:55:54 AM by AutoGen 5.17.3
|
||||||
* From the definitions ocserv-args.def
|
* From the definitions ocserv-args.def
|
||||||
* and the template file options
|
* and the template file options
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -219,6 +219,9 @@ run-as-group = nogroup
|
|||||||
# The name of the tun device
|
# The name of the tun device
|
||||||
device = vpns
|
device = vpns
|
||||||
|
|
||||||
|
# The default domain to be advertised
|
||||||
|
default-domain = example.com
|
||||||
|
|
||||||
# The pool of addresses that leases will be given from.
|
# The pool of addresses that leases will be given from.
|
||||||
ipv4-network = 192.168.1.0
|
ipv4-network = 192.168.1.0
|
||||||
ipv4-netmask = 255.255.255.0
|
ipv4-netmask = 255.255.255.0
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
*
|
*
|
||||||
* DO NOT EDIT THIS FILE (ocserv-args.h)
|
* DO NOT EDIT THIS FILE (ocserv-args.h)
|
||||||
*
|
*
|
||||||
* It has been AutoGen-ed April 29, 2013 at 02:14:53 PM by AutoGen 5.17.3
|
* It has been AutoGen-ed May 6, 2013 at 10:55:54 AM by AutoGen 5.17.3
|
||||||
* From the definitions ocserv-args.def
|
* From the definitions ocserv-args.def
|
||||||
* and the template file options
|
* and the template file options
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ struct cfg_st {
|
|||||||
char *chroot_dir; /* where the xml files are served from */
|
char *chroot_dir; /* where the xml files are served from */
|
||||||
char *banner;
|
char *banner;
|
||||||
char *ocsp_response; /* file with the OCSP response */
|
char *ocsp_response; /* file with the OCSP response */
|
||||||
|
char *default_domain; /* domain to be advertised */
|
||||||
|
|
||||||
char* socket_file_prefix;
|
char* socket_file_prefix;
|
||||||
time_t cookie_validity; /* in seconds */
|
time_t cookie_validity; /* in seconds */
|
||||||
|
|||||||
@@ -811,6 +811,11 @@ socklen_t sl;
|
|||||||
ret = tls_printf(ws->session, "X-CSTP-DPD: %u\r\n", ws->config->dpd);
|
ret = tls_printf(ws->session, "X-CSTP-DPD: %u\r\n", ws->config->dpd);
|
||||||
SEND_ERR(ret);
|
SEND_ERR(ret);
|
||||||
|
|
||||||
|
if (ws->config->default_domain) {
|
||||||
|
ret = tls_printf(ws->session, "X-CSTP-Default-Domain: %s\r\n", ws->config->default_domain);
|
||||||
|
SEND_ERR(ret);
|
||||||
|
}
|
||||||
|
|
||||||
ws->udp_state = UP_DISABLED;
|
ws->udp_state = UP_DISABLED;
|
||||||
if (req->master_secret_set != 0) {
|
if (req->master_secret_set != 0) {
|
||||||
memcpy(ws->master_secret, req->master_secret, TLS_MASTER_SIZE);
|
memcpy(ws->master_secret, req->master_secret, TLS_MASTER_SIZE);
|
||||||
|
|||||||
Reference in New Issue
Block a user