]> git.ipfire.org Git - thirdparty/bird.git/commit
Conf: Fix symbol lookup
authorOndrej Zajicek <santiago@crfreenet.org>
Thu, 27 Apr 2023 15:09:00 +0000 (17:09 +0200)
committerMaria Matejka <mq@ucw.cz>
Tue, 10 Oct 2023 12:27:36 +0000 (14:27 +0200)
commit6b2c9b7c66d9b9648213d3a7f071d0f720048e46
tree20d7cc5efbe2df26bb69ad68df33e8fc2ee0a831
parentd61505b039bf0aa6697e28b2a4e07907c89ba1fb
Conf: Fix symbol lookup

The symbol table used just symbol name as a key, and used a trick with
active flag to find symbols in active scopes with one hash table lookup.

The disadvantage is that it can degenerate to O(n) for negative queries
in situations where are many symbols with the same name in different
scopes.

Thanks to Yanko Kaneti for the bugreport.
conf/cf-lex.l
conf/conf.h
lib/hash.h