Added X-CSTP-Default-Domain option.

This commit is contained in:
Nikos Mavrogiannopoulos
2013-05-06 10:56:21 +03:00
parent 67e83f89d7
commit e0a7ad9fe6
7 changed files with 16 additions and 2 deletions

View File

@@ -119,6 +119,9 @@ run-as-group = nogroup
device = vpns
# The default domain to be advertised
default-domain = example.com
ipv4-network = 192.168.1.0
ipv4-netmask = 255.255.255.0
# Use the keywork local to advertize the local P-t-P address as DNS server

View File

@@ -169,6 +169,7 @@ unsigned j;
#endif
READ_STRING("ca-cert", config->ca, 0);
READ_STRING("default-domain", config->default_domain, 0);
READ_STRING("crl", config->crl, 0);
READ_STRING("cert-user-oid", config->cert_user_oid, 0);
READ_STRING("cert-group-oid", config->cert_group_oid, 0);
@@ -359,6 +360,7 @@ unsigned i;
DEL(config->cert_hash);
#endif
DEL(config->socket_file_prefix);
DEL(config->default_domain);
DEL(config->plain_passwd);
DEL(config->ocsp_response);
DEL(config->banner);

View File

@@ -2,7 +2,7 @@
*
* 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
* and the template file options
*

View File

@@ -219,6 +219,9 @@ run-as-group = nogroup
# The name of the tun device
device = vpns
# The default domain to be advertised
default-domain = example.com
# The pool of addresses that leases will be given from.
ipv4-network = 192.168.1.0
ipv4-netmask = 255.255.255.0

View File

@@ -2,7 +2,7 @@
*
* 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
* and the template file options
*

View File

@@ -88,6 +88,7 @@ struct cfg_st {
char *chroot_dir; /* where the xml files are served from */
char *banner;
char *ocsp_response; /* file with the OCSP response */
char *default_domain; /* domain to be advertised */
char* socket_file_prefix;
time_t cookie_validity; /* in seconds */

View File

@@ -811,6 +811,11 @@ socklen_t sl;
ret = tls_printf(ws->session, "X-CSTP-DPD: %u\r\n", ws->config->dpd);
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;
if (req->master_secret_set != 0) {
memcpy(ws->master_secret, req->master_secret, TLS_MASTER_SIZE);