MINOR: anon: store the anonymizing key in the global structure

Add a uint32_t key in global to hash words with it. A new CLI command
'set global-key <key>' was added to change the global anonymizing key.
The global may also be set in the configuration using the global
"anonkey" directive. For now this key is not used.
This commit is contained in:
Erwan Le Goas
2022-09-14 17:24:22 +02:00
committed by Willy Tarreau
parent 9c76637fff
commit fad9da83da
5 changed files with 54 additions and 0 deletions

View File

@@ -203,6 +203,7 @@ struct global {
unsigned int shctx_lookups, shctx_misses;
unsigned int req_count; /* request counter (HTTP or TCP session) for logs and unique_id */
int last_checks;
uint32_t anon_key;
/* leave this at the end to make sure we don't share this cache line by accident */
ALWAYS_ALIGN(64);