masaori335 opened a new pull request, #13345:
URL: https://github.com/apache/trafficserver/pull/13345
## What
`Log::init_fields()` registered the Proxy Protocol source/destination IP log
fields into `field_symbol_hash` under `ppsip`/`ppdip`, but the `LogField`s
(and the documentation) use the symbols `pps`/`ppd`. This aligns the hash
keys
with the actual symbols.
## Why this is not a critical bug
Obviously this is a bug, but logging output was not broken. Because
`LogFieldList::find_by_symbol()` falls back to a linear scan by symbol on a
hash miss, so `%<pps>`/`%<ppd>` still resolved correctly.
The mismatch only meant:
- the O(1) hash fast-path was skipped for these two fields (resolved via the
slower fallback instead),
- the undocumented `ppsip`/`ppdip` aliases were silently accepted, and
- the hash-only conflict/replace check in `TSLogFieldRegister()` could
mis-handle the `pps`/`ppd` symbols.
Note: formats that relied on the bogus `ppsip`/`ppdip` aliases will now be
rejected as unknown symbols; use the documented `pps`/`ppd`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]