MINOR: vars: store flags into variables and add VF_PERMANENT
authorWilly Tarreau <w@1wt.eu>
Wed, 8 Sep 2021 09:07:32 +0000 (11:07 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 8 Sep 2021 12:06:34 +0000 (14:06 +0200)
commit3dc6dc3178a7ea61eacf11a31541cfdb22321174
tree4204057d6656783b4cc5fcd41ac408a94ae1c74d
parent63c30667d7910ce4b76f4381c3bf902e249ad43d
MINOR: vars: store flags into variables and add VF_PERMANENT

In order to continue to honor the ifexist Lua option and prevent rogue
SPOA agents from creating too many variables, we'll need to keep the
ability to mark certain proc.* variables as permanent when they're
known from the config file.

Let's add a flag there for this. It's added to the variable when the
variable is created with this flag set by the caller.

Another approach could have been to use a distinct list or distinct
scope but that sounds complicated and bug-prone.
include/haproxy/vars-t.h
src/vars.c