From f3b6661ddda9a9c2591444799ff88cd82621d06b Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Mon, 24 Jun 2024 11:10:07 +0200 Subject: [PATCH] Additional CLI sockets can be now configured in the config file If the user has such a need, they may configure additional sockets in the config file. This may work for e.g. some advanced access control. --- conf/conf.c | 1 + conf/confbase.Y | 1 + doc/bird.sgml | 29 ++++++++++--- nest/cli.h | 4 ++ sysdep/unix/config.Y | 16 +++++++ sysdep/unix/io.c | 2 +- sysdep/unix/main.c | 99 ++++++++++++++++++++++++++++++++++++++------ sysdep/unix/unix.h | 2 +- 8 files changed, 134 insertions(+), 20 deletions(-) diff --git a/conf/conf.c b/conf/conf.c index d98d421c..805fdbd4 100644 --- a/conf/conf.c +++ b/conf/conf.c @@ -552,6 +552,7 @@ order_shutdown(int gr) init_list(&c->tables); init_list(&c->mpls_domains); init_list(&c->symbols); + c->cli = (struct cli_config_list) {}; memset(c->def_tables, 0, sizeof(c->def_tables)); c->shutdown = 1; c->gr_down = gr; diff --git a/conf/confbase.Y b/conf/confbase.Y index cdbdf1ce..4bf70ccf 100644 --- a/conf/confbase.Y +++ b/conf/confbase.Y @@ -100,6 +100,7 @@ CF_DECLS mpls_label_stack *mls; const struct adata *bs; struct aggr_item_node *ai; + struct cli_config *cli; } %token END CLI_MARKER INVALID_TOKEN ELSECOL DDOT diff --git a/doc/bird.sgml b/doc/bird.sgml index 44543012..5acdf7c1 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -1219,9 +1219,11 @@ protocol bgp { Remote control