Skip to content

Fix Proxy-Protocol log field symbols#13345

Open
masaori335 wants to merge 1 commit into
apache:masterfrom
masaori335:asf-master-pp-logs
Open

Fix Proxy-Protocol log field symbols#13345
masaori335 wants to merge 1 commit into
apache:masterfrom
masaori335:asf-master-pp-logs

Conversation

@masaori335

Copy link
Copy Markdown
Contributor

What

Log::init_fields() registered the Proxy Protocol source/destination IP log
fields into field_symbol_hash under ppsip/ppdip, but the LogFields
(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.

@masaori335 masaori335 added this to the 11.0.0 milestone Jun 29, 2026
@masaori335 masaori335 self-assigned this Jun 29, 2026
@masaori335 masaori335 added the Bug label Jun 29, 2026

@bryancall bryancall left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants