]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Merge commit '08ff0af8' into thread-merge-2.16
authorMaria Matejka <mq@ucw.cz>
Thu, 28 Nov 2024 11:07:30 +0000 (12:07 +0100)
committerMaria Matejka <mq@ucw.cz>
Thu, 28 Nov 2024 11:07:30 +0000 (12:07 +0100)
1  2 
conf/confbase.Y
doc/bird.sgml
nest/cli.c
nest/cli.h
sysdep/unix/config.Y
sysdep/unix/main.c

diff --cc conf/confbase.Y
index f3b0db617ca48cfa69c2ba72ecf4ea5d2f48e599,cdbdf1ce29e7bbc269401fc5e0211e88690cc86e..99fb3d7abb3a6dd6401bcf1ad1b4f08e268b9952
@@@ -101,11 -97,9 +101,10 @@@ CF_DECL
    struct proto_spec ps;
    struct channel_limit cl;
    struct timeformat *tf;
 -  mpls_label_stack *mls;
 +  struct settle_config settle;
 +  struct adata *ad;
    const struct adata *bs;
    struct aggr_item_node *ai;
-   struct cli_config *cli;
  }
  
  %token END CLI_MARKER INVALID_TOKEN ELSECOL DDOT
diff --cc doc/bird.sgml
Simple merge
diff --cc nest/cli.c
index e40ae1d971f2975fc27f84416b460f3b8f5ae25f,4601f86334fefcc9236efc416eb6453351ced53b..dd0ce40796f19706dc0e157a3e4f42409a2ef8ec
@@@ -272,9 -306,9 +272,9 @@@ cli_event(void *data
  }
  
  cli *
- cli_new(struct birdsock *sock)
 -cli_new(void *priv, struct cli_config *cf)
++cli_new(struct birdsock *sock, struct cli_config *cf)
  {
 -  pool *p = rp_new(cli_pool, "CLI");
 +  pool *p = rp_new(cli_pool, the_bird_domain.the_bird, "CLI");
    cli *c = mb_alloc(p, sizeof(cli));
  
    bzero(c, sizeof(cli));
    c->event->data = c;
    c->cont = cli_hello;
    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;
  }
diff --cc nest/cli.h
index 0bfd7b46e3bfdf5511d2e743ddcdec3df16fe410,afcb6d552242efaf365359daea38068f07aecd91..c3dfc3eb5dab92a399323b76bd32b8fefa16511a
@@@ -78,7 -82,7 +79,7 @@@ static inline void cli_separator(cli *c
  
  /* Functions provided to sysdep layer */
  
- cli *cli_new(struct birdsock *);
 -cli *cli_new(void *, struct cli_config *);
++cli *cli_new(struct birdsock *, struct cli_config *);
  void cli_init(void);
  void cli_free(cli *);
  void cli_kick(cli *);
index 29dd31c16999bd6b9dbf065938d5bf0320444a84,7607f34aa2767b5777ef50f7625f4e0bdf0e7fa3..25eb36ede2b2a90eeb388049a381bf2a5312cc3b
@@@ -17,13 -18,11 +18,12 @@@ static struct cli_config *this_cli_conf
  
  CF_DECLS
  
 -CF_KEYWORDS(LOG, SYSLOG, NAME, STDERR, UDP, PORT, CLI)
 -CF_KEYWORDS(ALL, DEBUG, TRACE, INFO, REMOTE, WARNING, ERROR, AUTH, FATAL, BUG)
 -CF_KEYWORDS(DEBUG, LATENCY, LIMIT, WATCHDOG, WARNING, TIMEOUT, THREADS)
 +CF_KEYWORDS(LOG, SYSLOG, ALL, DEBUG, TRACE, INFO, REMOTE, WARNING, ERROR, AUTH, FATAL, BUG, STDERR, SOFT, UDP, PORT, CLI)
 +CF_KEYWORDS(NAME, CONFIRM, UNDO, CHECK, TIMEOUT, DEBUG, LATENCY, LIMIT, WATCHDOG, WARNING, STATUS)
 +CF_KEYWORDS(PING, WAKEUP, SOCKETS, SCHEDULING, EVENTS, TIMERS, ALLOCATOR)
 +CF_KEYWORDS(GRACEFUL, RESTART, FIXED)
  
- %type <cli> cli_opts
 -%type <i> log_mask log_mask_list log_cat cfg_timeout
 +%type <i> log_mask log_mask_list log_cat cfg_timeout debug_unix latency_debug_mask latency_debug_flag latency_debug_list
  %type <t> cfg_name
  %type <tf> timeformat_which
  %type <t> syslog_name
@@@ -138,12 -142,11 +141,17 @@@ cli_opts_begin: 
    };
  };
  
+ cli_opts_block:
+   /* EMPTY */ |
+   cli_opts_block RESTRICT { this_cli_config->restricted = 1; }
+ ;
 +conf: THREADS expr {
 +    if ($2 < 1) cf_error("Number of threads must be at least one.");
 +    new_config->thread_count = $2;
 +}
 +
 +
  conf: debug_unix ;
  
  debug_unix:
Simple merge