mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-10-14 02:22:03 +08:00
udp-port can now be unset, and that will disable listening to UDP.
This commit is contained in:
@@ -4,6 +4,8 @@
|
|||||||
compatibility. Patch by Kevin Cernekee.
|
compatibility. Patch by Kevin Cernekee.
|
||||||
- When a new connection presents a cookie of an existing session
|
- When a new connection presents a cookie of an existing session
|
||||||
the previous session is disconnected (and its IP is hijacked).
|
the previous session is disconnected (and its IP is hijacked).
|
||||||
|
- If udp-port is unset or set to zero then the server will not listen
|
||||||
|
for UDP sessions.
|
||||||
|
|
||||||
|
|
||||||
* Version 0.2.2 (released 2013-11-23)
|
* Version 0.2.2 (released 2013-11-23)
|
||||||
|
|||||||
@@ -452,9 +452,6 @@ static void check_cfg( struct cfg_st *config)
|
|||||||
if (config->dpd == 0)
|
if (config->dpd == 0)
|
||||||
config->keepalive = 60;
|
config->keepalive = 60;
|
||||||
|
|
||||||
if (config->udp_port == 0)
|
|
||||||
config->udp_port = config->port;
|
|
||||||
|
|
||||||
if (config->priorities == NULL)
|
if (config->priorities == NULL)
|
||||||
config->priorities = "NORMAL:%SERVER_PRECEDENCE:%COMPAT";
|
config->priorities = "NORMAL:%SERVER_PRECEDENCE:%COMPAT";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -209,6 +209,7 @@ listen_ports(struct cfg_st* config, struct listen_list_st *list, const char *nod
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config->udp_port) {
|
||||||
snprintf(portname, sizeof(portname), "%d", config->udp_port);
|
snprintf(portname, sizeof(portname), "%d", config->udp_port);
|
||||||
|
|
||||||
memset(&hints, 0, sizeof(hints));
|
memset(&hints, 0, sizeof(hints));
|
||||||
@@ -232,6 +233,7 @@ listen_ports(struct cfg_st* config, struct listen_list_st *list, const char *nod
|
|||||||
}
|
}
|
||||||
|
|
||||||
freeaddrinfo(res);
|
freeaddrinfo(res);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user