Proxy protocol moves tolog transport#156
Merged
alltilla merged 15 commits intoaxoflow:mainfrom Oct 24, 2024
Merged
Conversation
4ba6ca2 to
a496b05
Compare
5588b6a to
053c429
Compare
1e92e02 to
a8c2436
Compare
514c8a2 to
ad432b0
Compare
alltilla
reviewed
Sep 27, 2024
tests/light/functional_tests/source_drivers/network_source/proxyprotocol/test_pp_network.py
Show resolved
Hide resolved
Member
|
style check fails on this: --- a/modules/afsocket/transport-mapper-inet.c
+++ b/modules/afsocket/transport-mapper-inet.c
@@ -91,8 +91,8 @@ _setup_socket_transport(TransportMapperInet *self, LogTransportStack *stack)
{
log_transport_stack_add_transport(stack, LOG_TRANSPORT_SOCKET,
self->super.sock_type == SOCK_DGRAM
- ? log_transport_udp_socket_new(stack->fd)
- : log_transport_stream_socket_new(stack->fd));
+ ? log_transport_udp_socket_new(stack->fd)
+ : log_transport_stream_socket_new(stack->fd));
return TRUE;
} |
Signed-off-by: Balazs Scheidler <[email protected]>
…transport Signed-off-by: Balazs Scheidler <[email protected]>
…port() Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
These are interdependent interfaces and LogTransportStack will be the sole user of LogTransportFactory. Signed-off-by: Balazs Scheidler <[email protected]>
Instead of relying on the factory to initialize name, initialize it through the normal constructor path. Signed-off-by: Balazs Scheidler <[email protected]>
…a stack of LogTransports Instead of trying to reuse the LogTransport interface and hide cases where we need multiple swappable LogTransports, let's introduce a LogTransportStack, that explicitly tracks all such LogTransports, takes care of their lifecycle and allows them to be swapped during a connection. To be used for HA Proxy protocol support. Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
ad432b0 to
d9d4897
Compare
This patch is based on the LogTransport implementation in github.com/syslog-ng/syslog-ng, which in turn is based on my original implementation of proxy support as a LogProto class. Signed-off-by: Alex Becker <[email protected]> Signed-off-by: Hofi <[email protected]> Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Alex Becker <[email protected]> Signed-off-by: Hofi <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
…roxied' loggen parameter Signed-off-by: Hofi <[email protected]>
…e loggen with proper `proxied` switches Signed-off-by: Hofi <[email protected]>
d9d4897 to
1774231
Compare
Member
Author
|
I've fixed up the outstanding review notes and made sure the CI is green. |
alltilla
approved these changes
Oct 24, 2024
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.
This is now a complete LogTransport based implementation of the HAProxy protocol so it applies cleanly to any kind of LogProto implementation.