fix: Add IPv6 support for bind parameter#240
Open
I501307 wants to merge 3 commits intofluent:masterfrom
Open
Conversation
Fixes two IPv6-related bugs when using bind='::': 1. Log message construction: Previously created invalid URL 'http://:::24231' instead of 'http://[::]:24231' 2. Worker aggregation: When bind is '::', the code tried to connect to '::' directly instead of converting it to '::1' (IPv6 localhost), causing connection failures Changes: - Add bracket notation for IPv6 addresses in log messages - Convert '::' to '::1' for inter-worker communication - Maintain backward compatibility with IPv4 addresses Fixes fluent#229 Signed-off-by: Jesse Awan <jesse.awan@sap.com>
82ad754 to
be6af88
Compare
Author
|
Could a maintainer please add the bug label? This fixes a crash affecting all Fluentd versions when binding to IPv6 addresses. |
Author
|
@Watson1978 @kenhys isn't this more or less the same problem : fluent/fluentd#5239 |
Contributor
|
Can you add the tests? |
- Add ipv6_enabled? helper to detect IPv6 support - Add integration tests for IPv6 loopback (::1), any (::), and pre-bracketed addresses - Refactor tests using shared_examples pattern to reduce duplication (60 → 35 lines) - Handle pre-bracketed addresses by stripping brackets before socket binding - Pass bracketed IPv6 addresses to http_server helper for proper URI construction - All IPv6 tests pass on systems with IPv6 support, skip gracefully otherwise - Add /vendor/ to .gitignore for local bundle installations Signed-off-by: Jesse Awan <jesse.awan@sap.com>
b207100 to
456e024
Compare
Author
Author
|
@Watson1978 can you try triggering github unit tests so we can verify? 🌻 |
kenhys
requested changes
Feb 13, 2026
Signed-off-by: Jesse Awan <jesse.awan@sap.com>
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.
Fixes two IPv6-related bugs when using bind='::':
Log message construction: Previously created invalid URL 'http://:::24231' instead of 'http://[::]:24231'
Worker aggregation: When bind is '::', the code tried to connect to '::' directly instead of converting it to '::1' (IPv6 localhost), causing connection failures
Changes:
Fixes #229