Skip to content

Fix Proxy-Protocol log field symbols - #13345

Merged
masaori335 merged 1 commit into
apache:masterfrom
masaori335:asf-master-pp-logs
Jul 2, 2026
Merged

Fix Proxy-Protocol log field symbols#13345
masaori335 merged 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

@masaori335
masaori335 merged commit 7772518 into apache:master Jul 2, 2026
15 checks passed
@github-project-automation github-project-automation Bot moved this to For v10.2.0 in ATS v10.2.x Jul 2, 2026
@cmcfarlen cmcfarlen moved this from For v10.2.0 to Picked v10.2.0 in ATS v10.2.x Jul 6, 2026
@cmcfarlen cmcfarlen modified the milestones: 11.0.0, 10.2.0 Jul 6, 2026
@cmcfarlen

Copy link
Copy Markdown
Contributor

Cherry-picked to 10.2.x

cmcfarlen pushed a commit that referenced this pull request Jul 6, 2026
cmcfarlen pushed a commit to cmcfarlen/trafficserver that referenced this pull request Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Picked v10.2.0

Development

Successfully merging this pull request may close these issues.

3 participants