mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 16:57:00 +08:00
Use a single UDP port in the server.
Several modifications to use a single UDP port in the server. This is currently done using a hack, i.e., pass the UDP socket to worker, close it on the main server and then re-open it (using REUSEADDR). Also several updates in TUN handling to allow more than one clients connecting.
This commit is contained in:
@@ -125,6 +125,7 @@ unsigned j;
|
||||
READ_STRING("listen-host", config->name, 0);
|
||||
|
||||
READ_NUMERIC("tcp-port", config->port, 1);
|
||||
READ_NUMERIC("udp-port", config->udp_port, 0);
|
||||
READ_NUMERIC("keepalive", config->keepalive, 0);
|
||||
|
||||
READ_STRING("server-cert", config->cert, 1);
|
||||
@@ -199,6 +200,9 @@ static void check_cfg( struct cfg_st *config)
|
||||
|
||||
if (config->keepalive == 0)
|
||||
config->keepalive = 30;
|
||||
|
||||
if (config->udp_port == 0)
|
||||
config->udp_port = config->port;
|
||||
|
||||
if (config->priorities == NULL)
|
||||
config->priorities = "NORMAL:%SERVER_PRECEDENCE:%COMPAT";
|
||||
|
||||
Reference in New Issue
Block a user