mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-03-16 06:49:19 +08:00
pass DPD and keepalive values to occtl
This commit is contained in:
@@ -47,6 +47,8 @@ message user_info_rep
|
||||
repeated string no_routes = 25;
|
||||
optional string local_dev_ip = 26;
|
||||
repeated string domains = 27; /* split-dns domains */
|
||||
required uint32 dpd = 28;
|
||||
required uint32 keepalive = 29;
|
||||
}
|
||||
|
||||
message user_list_rep
|
||||
|
||||
@@ -373,6 +373,16 @@ static int append_user_info(method_ctx *ctx,
|
||||
tmp *= 1000;
|
||||
rep->tx_per_sec = tmp;
|
||||
|
||||
if (ctmp->config.dpd)
|
||||
rep->dpd = ctmp->config.dpd;
|
||||
else
|
||||
rep->dpd = ctx->s->config->dpd;
|
||||
|
||||
if (ctmp->config.keepalive)
|
||||
rep->keepalive = ctmp->config.keepalive;
|
||||
else
|
||||
rep->dpd = ctx->s->config->dpd;
|
||||
|
||||
rep->domains = ctx->s->config->split_dns;
|
||||
rep->n_domains = ctx->s->config->split_dns_size;
|
||||
|
||||
|
||||
@@ -753,6 +753,7 @@ int common_info_cmd(UserListRep * args, FILE *out, cmd_params_st *params)
|
||||
char *groupname = "";
|
||||
char str_since[64];
|
||||
char tmpbuf[MAX_TMPSTR_SIZE];
|
||||
char tmpbuf2[MAX_TMPSTR_SIZE];
|
||||
struct tm *tm;
|
||||
time_t t;
|
||||
unsigned at_least_one = 0;
|
||||
@@ -829,6 +830,8 @@ int common_info_cmd(UserListRep * args, FILE *out, cmd_params_st *params)
|
||||
|
||||
print_iface_stats(args->user[i]->tun, args->user[i]->conn_time, out, params, 1);
|
||||
|
||||
print_pair_value(out, params, "DPD", int2str(tmpbuf, args->user[i]->dpd), "KeepAlive", int2str(tmpbuf2, args->user[i]->keepalive), 1);
|
||||
|
||||
print_single_value(out, params, "Hostname", args->user[i]->hostname, 1);
|
||||
|
||||
print_time_ival7(tmpbuf, time(0), t);
|
||||
|
||||
Reference in New Issue
Block a user