mirror of
https://github.com/haproxy/haproxy.git
synced 2026-03-02 13:20:24 -05:00
MINOR: tools: Impprove hash_ipanon to not hash FD-based addresses
"stdout" and "stderr" are not hashed. In the same spirit, "fd@" and "sockpair@" prefixes are not hashed too. There is no reason to hash such address and it may be useful to diagnose bugs. No backport needed, except if anonymization mechanism is backported.
This commit is contained in:
parent
7e50e4b9cc
commit
015bbc298f
1 changed files with 5 additions and 1 deletions
|
|
@ -5895,7 +5895,11 @@ const char *hash_ipanon(uint32_t scramble, char *ipstring, int hasport)
|
|||
if (scramble == 0) {
|
||||
return ipstring;
|
||||
}
|
||||
if (strcmp(ipstring, "localhost") == 0) {
|
||||
if (strcmp(ipstring, "localhost") == 0 ||
|
||||
strcmp(ipstring, "stdout") == 0 ||
|
||||
strcmp(ipstring, "stderr") == 0 ||
|
||||
strncmp(ipstring, "fd@", 3) == 0 ||
|
||||
strncmp(ipstring, "sockpair@", 9) == 0) {
|
||||
return ipstring;
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue