]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Merge commit '6b95353e' into thread-next
authorMaria Matejka <mq@ucw.cz>
Fri, 27 Oct 2023 16:30:37 +0000 (18:30 +0200)
committerMaria Matejka <mq@ucw.cz>
Fri, 27 Oct 2023 16:34:16 +0000 (18:34 +0200)
1  2 
conf/cf-lex.l
conf/conf.h

diff --cc conf/cf-lex.l
index 6399fa66da5a98a16757ddc97f31e096a0e3dfc8,8dc0ac89ac3e88624efc97ca82a48685e21e2318..179b66a492504aad068e09cd0ec946b94c8c2731
@@@ -767,10 -711,12 +770,13 @@@ cf_lex_init(int is_cli, struct config *
  
      for (const struct keyword *k = keyword_list; k->name; k++)
      {
 -      struct symbol *sym = cf_new_symbol(global_root_scope, global_root_scope_pool, kwlp, k->name);
 -      sym->class = SYM_KEYWORD;
 -      sym->keyword = k;
 +      struct symbol *s = cf_root_symbol(k->name, &global_root_scope);
 +      s->class = SYM_KEYWORD;
 +      s->keyword = k;
      }
 -    global_root_scope->readonly = 1;
++    global_root_scope.readonly = 1;
++    global_filter_scope.readonly = 1;
    }
  
    ifs_head = ifs = push_ifs(NULL);
diff --cc conf/conf.h
index 767544b871b705a8cd251ce9cb8940a6128b322d,8558fcbaedef1b987ac4180dfc49f847ceeb44ef..f7833d9e168834e13368c1c6d5dadc428c0b6043
@@@ -141,13 -137,13 +141,14 @@@ struct sym_scope 
    HASH(struct symbol) hash;           /* Local symbol hash */
  
    uint slots;                         /* Variable slots */
-   byte active;                                /* Currently entered */
-   byte block;                         /* No independent stack frame */
    byte soft_scopes;                   /* Number of soft scopes above */
+   byte active:1;                      /* Currently entered */
+   byte block:1;                               /* No independent stack frame */
+   byte readonly:1;                    /* Do not add new symbols */
  };
  
 -extern struct sym_scope *global_root_scope;
 +void cf_enter_filters(void);
 +void cf_exit_filters(void);
  
  struct bytestring {
    size_t length;