mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 16:57:00 +08:00
Added directives to allow bandwidth limitation.
This commit is contained in:
@@ -52,6 +52,8 @@ static struct cfg_options available_options[] = {
|
||||
{ .name = "ipv4-netmask", .type = OPTION_STRING },
|
||||
{ .name = "ipv6-prefix", .type = OPTION_NUMERIC },
|
||||
{ .name = "ipv6-netmask", .type = OPTION_STRING },
|
||||
{ .name = "rx-per-sec", .type = OPTION_NUMERIC, },
|
||||
{ .name = "tx-per-sec", .type = OPTION_NUMERIC, },
|
||||
};
|
||||
|
||||
#define READ_RAW_MULTI_LINE(name, s_name, num) \
|
||||
@@ -143,6 +145,9 @@ unsigned prefix = 0;
|
||||
if (prefix > 0)
|
||||
config->ipv6_netmask = ipv6_prefix_to_mask(prefix);
|
||||
|
||||
READ_RAW_NUMERIC("rx-per-sec", config->rx_per_sec);
|
||||
READ_RAW_NUMERIC("tx-per-sec", config->tx_per_sec);
|
||||
|
||||
optionUnloadNested(pov);
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user