mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 00:37:00 +08:00
stats-report-time and session-timeout can be set per user/group as well
This commit is contained in:
@@ -526,7 +526,7 @@ no-route = 192.168.5.0/255.255.255.0
|
||||
# The options allowed in the configuration files are dns, nbns,
|
||||
# ipv?-network, ipv4-netmask, rx/tx-per-sec, iroute, route, no-route,
|
||||
# explicit-ipv4, explicit-ipv6, net-priority, deny-roaming, no-udp,
|
||||
# user-profile, and cgroup.
|
||||
# user-profile, cgroup, stats-report-time, and session-timeout.
|
||||
#
|
||||
# Note that the 'iroute' option allows to add routes on the server
|
||||
# based on a user or group. The syntax depends on the input accepted
|
||||
|
||||
@@ -64,6 +64,8 @@ static struct cfg_options available_options[] = {
|
||||
{ .name = "net-priority", .type = OPTION_STRING },
|
||||
{ .name = "cgroup", .type = OPTION_STRING },
|
||||
{ .name = "user-profile", .type = OPTION_STRING },
|
||||
{ .name = "session-timeout", .type = OPTION_NUMERIC},
|
||||
{ .name = "stats-report-time", .type = OPTION_NUMERIC}
|
||||
};
|
||||
|
||||
#define READ_RAW_MULTI_LINE(name, s_name, num) { \
|
||||
@@ -225,6 +227,9 @@ unsigned prefix = 0;
|
||||
READ_RAW_NUMERIC("tx-data-per-sec", msg->tx_per_sec, msg->has_tx_per_sec);
|
||||
msg->rx_per_sec /= 1000; /* in kb */
|
||||
msg->tx_per_sec /= 1000; /* in kb */
|
||||
|
||||
READ_RAW_NUMERIC("stats-report-time", msg->interim_update_secs, msg->has_interim_update_secs);
|
||||
READ_RAW_NUMERIC("session-timeout", msg->session_timeout_secs, msg->has_session_timeout_secs);
|
||||
|
||||
/* net-priority will contain the actual priority + 1,
|
||||
* to allow having zero as uninitialized. */
|
||||
|
||||
Reference in New Issue
Block a user