jax_fingerprint: Emit type-default for custom log fields with no transaction#13243
Conversation
When a log entry has no backing HttpSM (e.g. a malformed H2/H3 request rejected before transaction creation), passing nullptr to a TSLogFieldRegister'd callback dereferences null inside the plugin. Skip the callback in that case and emit the type-appropriate default the way built-in fields do: 0 for ints, "-" for strings, AF_UNSPEC for IPs.
There was a problem hiding this comment.
Pull request overview
This PR hardens ATS custom log field marshalling for cases where a log entry is generated without an HttpSM (e.g., malformed H2/H3 requests rejected before transaction creation). Instead of calling plugin-provided TSLogFieldRegister callbacks with a null transaction pointer (which can crash plugins), it emits the same type-appropriate defaults used by built-in fields.
Changes:
- Plumbs
LogField::TypeintoLogAccess::marshal_custom_field()so it can select a default value when there’s no backing transaction. - Skips the plugin callback when
http_sm_for_plugins()is null and marshals a default value:0(ints),"-"(strings),AF_UNSPEC(IPs). - Updates
LogFieldcall sites and theLogAccessdeclaration to match the new signature.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/proxy/logging/LogField.cc | Passes the field type into custom-field marshalling for both sizing and data writes. |
| src/proxy/logging/LogAccess.cc | Implements type-based default marshalling when no transaction is available, avoiding null plugin callbacks. |
| include/proxy/logging/LogAccess.h | Updates the marshal_custom_field API to accept LogField::Type. |
|
I’m trying to build the project using version 8, but I’m encountering some issues. When building traffic_opc with the Dockerfile, there seems to be a problem with pdgp:13. It looks like this dependency or image might need to be changed. Additionally, I’m also having issues with the Traffic Ops Dockerfile during the build process. Does anyone have any suggestions on how to resolve these problems? |
|
@amirnoshian If you could open an issue that would help us track it. This is not the right thread for your comment. Please ask if you would like help opening an issue or have questions about it. |
|
thanks for your feedback now i make the new issue do you have idea for
thats problem ?
…On Mon, Jun 8, 2026 at 3:19 PM JosiahWI ***@***.***> wrote:
*JosiahWI* left a comment (apache/trafficserver#13243)
<#13243 (comment)>
@amirnoshian <https://github.com/amirnoshian> If you could open an issue
that would help us track it. This is not the right thread for your comment.
Please ask if you would like help opening an issue or have questions about
it.
—
Reply to this email directly, view it on GitHub
<#13243?email_source=notifications&email_token=AW2PJBZYLRFCSWWWNYZBSTD462R5DA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINRUHA3DOMZWHA2KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-4648673684>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AW2PJBYA3QVBXUG3QNTIEAD462R5DAVCNFSM6AAAAACZ4U4G3CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DMNBYGY3TGNRYGQ>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AW2PJB5P5XASXZTK3QXIE2D462R5DA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINRUHA3DOMZWHA2KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJKTGN5XXIZLSL5UW64Y>
and Android
<https://github.com/notifications/mobile/android/AW2PJBZPO4Y7R2U4CA3NSX3462R5DA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINRUHA3DOMZWHA2KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>.
Download it today!
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
[approve ci osx freebsd] |
When a log entry has no backing HttpSM (e.g. a malformed H2/H3 request rejected before transaction creation), passing nullptr to a TSLogFieldRegister'd callback dereferences null inside the plugin. Skip the callback in that case and emit the type-appropriate default the way built-in fields do: 0 for ints, "-" for strings, AF_UNSPEC for IPs.