summaryrefslogtreecommitdiff
path: root/nest/cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'nest/cli.c')
-rw-r--r--nest/cli.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/nest/cli.c b/nest/cli.c
index b54a0d76..4601f863 100644
--- a/nest/cli.c
+++ b/nest/cli.c
@@ -306,7 +306,7 @@ cli_event(void *data)
}
cli *
-cli_new(void *priv)
+cli_new(void *priv, struct cli_config *cf)
{
pool *p = rp_new(cli_pool, "CLI");
cli *c = mb_alloc(p, sizeof(cli));
@@ -321,6 +321,10 @@ cli_new(void *priv)
c->parser_pool = lp_new_default(c->pool);
c->show_pool = lp_new_default(c->pool);
c->rx_buf = mb_alloc(c->pool, CLI_RX_BUF_SIZE);
+
+ if (cf->restricted)
+ c->restricted = 1;
+
ev_schedule(c->event);
return c;
}