mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 00:37:00 +08:00
Allow setting NBNS.
This commit is contained in:
10
doc/ocserv.1
10
doc/ocserv.1
@@ -1,8 +1,8 @@
|
||||
.TH ocserv 1 "22 Feb 2013" "0.0.1" "User Commands"
|
||||
.TH ocserv 1 "24 Feb 2013" "0.0.1" "User Commands"
|
||||
.\"
|
||||
.\" DO NOT EDIT THIS FILE (ocserv-args.man)
|
||||
.\"
|
||||
.\" It has been AutoGen-ed February 22, 2013 at 07:35:41 PM by AutoGen 5.16
|
||||
.\" It has been AutoGen-ed February 24, 2013 at 11:24:04 AM by AutoGen 5.16
|
||||
.\" From the definitions ../src/ocserv-args.def.tmp
|
||||
.\" and the template file agman-cmd.tpl
|
||||
.\"
|
||||
@@ -265,14 +265,20 @@ device = vpns
|
||||
# The pool of addresses that leases will be given from.
|
||||
ipv4\-network = 192.168.1.0
|
||||
ipv4\-netmask = 255.255.255.0
|
||||
.sp
|
||||
# The DNS advertized server
|
||||
# Use the keywork local to advertize the local P\-t\-P address as DNS server
|
||||
# ipv4\-dns = 192.168.2.1
|
||||
ipv4\-dns = local
|
||||
.sp
|
||||
# The NBNS server (if any)
|
||||
#ipv4\-nbns = 192.168.2.3
|
||||
.sp
|
||||
# The same, but for IPv6.
|
||||
#ipv6\-address =
|
||||
#ipv6\-mask =
|
||||
#ipv6\-dns =
|
||||
#ipv6\-nbns =
|
||||
.sp
|
||||
# Unset to assign the default MTU of the device
|
||||
# mtu =
|
||||
|
||||
@@ -201,6 +201,9 @@ unsigned j;
|
||||
READ_STRING("ipv6-netmask", config->network.ipv6_netmask, 0);
|
||||
READ_STRING("ipv6-dns", config->network.ipv6_dns, 0);
|
||||
|
||||
READ_STRING("ipv4-nbns", config->network.ipv4_nbns, 0);
|
||||
READ_STRING("ipv6-nbns", config->network.ipv6_nbns, 0);
|
||||
|
||||
READ_MULTI_LINE("route", config->network.routes, config->network.routes_size, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
*
|
||||
* DO NOT EDIT THIS FILE (ocserv-args.c)
|
||||
*
|
||||
* It has been AutoGen-ed February 22, 2013 at 07:35:35 PM by AutoGen 5.16
|
||||
* It has been AutoGen-ed February 24, 2013 at 11:23:54 AM by AutoGen 5.16
|
||||
* From the definitions ocserv-args.def
|
||||
* and the template file options
|
||||
*
|
||||
|
||||
@@ -181,14 +181,20 @@ device = vpns
|
||||
# The pool of addresses that leases will be given from.
|
||||
ipv4-network = 192.168.1.0
|
||||
ipv4-netmask = 255.255.255.0
|
||||
|
||||
# The DNS advertized server
|
||||
# Use the keywork local to advertize the local P-t-P address as DNS server
|
||||
# ipv4-dns = 192.168.2.1
|
||||
ipv4-dns = local
|
||||
|
||||
# The NBNS server (if any)
|
||||
#ipv4-nbns = 192.168.2.3
|
||||
|
||||
# The same, but for IPv6.
|
||||
#ipv6-address =
|
||||
#ipv6-mask =
|
||||
#ipv6-dns =
|
||||
#ipv6-nbns =
|
||||
|
||||
# Unset to assign the default MTU of the device
|
||||
# mtu =
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
*
|
||||
* DO NOT EDIT THIS FILE (ocserv-args.h)
|
||||
*
|
||||
* It has been AutoGen-ed February 22, 2013 at 07:35:35 PM by AutoGen 5.16
|
||||
* It has been AutoGen-ed February 24, 2013 at 11:23:54 AM by AutoGen 5.16
|
||||
* From the definitions ocserv-args.def
|
||||
* and the template file options
|
||||
*
|
||||
|
||||
@@ -46,6 +46,8 @@ struct vpn_st {
|
||||
char *ipv6_local; /* local IPv6 address */
|
||||
char *ipv4_dns;
|
||||
char *ipv6_dns;
|
||||
char *ipv4_nbns;
|
||||
char *ipv6_nbns;
|
||||
unsigned int mtu;
|
||||
char **routes;
|
||||
unsigned int routes_size;
|
||||
|
||||
@@ -652,6 +652,10 @@ unsigned mtu_overhead, tls_mtu = 0;
|
||||
ret = tls_printf(ws->session, "X-CSTP-DNS: %s\r\n", vinfo.ipv4_dns);
|
||||
SEND_ERR(ret);
|
||||
}
|
||||
if (vinfo.ipv4_nbns) {
|
||||
ret = tls_printf(ws->session, "X-CSTP-NBNS: %s\r\n", vinfo.ipv4_nbns);
|
||||
SEND_ERR(ret);
|
||||
}
|
||||
}
|
||||
|
||||
if (vinfo.ipv6) {
|
||||
@@ -667,6 +671,10 @@ unsigned mtu_overhead, tls_mtu = 0;
|
||||
ret = tls_printf(ws->session, "X-CSTP-DNS: %s\r\n", vinfo.ipv6_dns);
|
||||
SEND_ERR(ret);
|
||||
}
|
||||
if (vinfo.ipv6_nbns) {
|
||||
ret = tls_printf(ws->session, "X-CSTP-NBNS: %s\r\n", vinfo.ipv6_nbns);
|
||||
SEND_ERR(ret);
|
||||
}
|
||||
}
|
||||
|
||||
for (i=0;i<vinfo.routes_size;i++) {
|
||||
|
||||
Reference in New Issue
Block a user