Repository navigation
Fix IPv6 address parsing in awf logs - #11953
Merged
Merged
Conversation
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
lpcox
marked this pull request as ready for review
November 22, 2026 17:24
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the IPv6 log-parsing and output-preservation changes.
No open issues 🎉
What changed in this PR
Fixes #11927 by correcting IPv6 address parsing in AWF’s Squid text logs, preserving destination fields in JSON and port display in pretty output.
Changes:
- Split client and upstream address fields at the last colon, preserving IPv4 and numeric-or-dash upstream ports.
- Add regression coverage for IPv6 clients and upstreams, plus JSON and pretty output.
| File | Description |
|---|---|
src/logs/log-parser.ts |
Updates address captures to support unbracketed IPv6. |
src/logs/log-parser-ipv6.test.ts |
Covers IPv6 address variants, IPv4, and missing upstream values. |
src/logs/log-formatter.test.ts |
Verifies parsed IPv6 entries produce correct JSON and pretty output. |
Review effort: Balanced (adaptive)
Contributor
|
✅ Copilot review passed with no inline comments. @lpcox Add the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Squid logs unbracketed IPv6 upstream addresses, but the text parser split at the first colon, corrupting JSON destination fields and displaying IPv6 fragments as ports in pretty output.
For example: