-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
proxy_proto: fixing hashing bug #13768
Conversation
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Also per @rchernobelskiy 's comment on the issue, can anyone think of a better way to avoid bugs of this type? I really dislike sizeof tests, but the best I can think of is a sizeof() test which best-effort catches new proxy protocol additions and suggests that we update the hash before adjusting the size. Any better ideas? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
const Network::ConnectionSocket::OptionsSharedPtr& options); | ||
const Network::ConnectionSocket::OptionsSharedPtr& options, | ||
Network::Address::InstanceConstSharedPtr source_address = | ||
Network::Address::InstanceConstSharedPtr()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style nit: this is nullptr?
/** | ||
* @return bool whether the transport socket will use proxy protocol options. | ||
*/ | ||
virtual bool usesProxyProtocolOptions() const { return false; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tap transport socket would need return underlying transport socket value instead of false.
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Sorry, I think I need another stamp after merge |
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Thanks you guys for the fix 🎉 |
@envoyproxy/stable-maintainers haven't reviewed the backport yet, but there's also not a set schedule for backport releases other than when we cut a CVE release. |
I think it should be backported to 1.16 - starting this work. |
Fix a bug where the transport socket options for the first downstream got reused for subsequent upstream connections. Risk Level: low Testing: new integration test Docs Changes: n/a Release Notes: Platform Specific Features: Fixes envoyproxy#13659 Signed-off-by: Alyssa Wilk <alyssar@chromium.org> Signed-off-by: Christoph Pakulski <christoph@tetrate.io>
Fix a bug where the transport socket options for the first downstream got reused for subsequent upstream connections. Risk Level: low Testing: new integration test Docs Changes: n/a Release Notes: Platform Specific Features: Fixes #13659 Signed-off-by: Alyssa Wilk <alyssar@chromium.org> Signed-off-by: Christoph Pakulski <christoph@tetrate.io>
* backport: Prevent SEGFAULT when disabling listener (envoyproxy#13515) (envoyproxy#13882) * Prevent SEGFAULT when disabling listener (envoyproxy#13515) This prevents the stop_listening overload action from causing segmentation faults that can occur if the action is enabled after the listener has already shut down. Signed-off-by: Alex Konradi <akonradi@google.com> Signed-off-by: Christoph Pakulski <christoph@tetrate.io> * backport to rel-1.16: proxy_proto - fixing hashing bug envoyproxy#13768 (envoyproxy#13966) Fix a bug where the transport socket options for the first downstream got reused for subsequent upstream connections. Risk Level: low Testing: new integration test Docs Changes: n/a Release Notes: Platform Specific Features: Fixes envoyproxy#13659 Signed-off-by: Alyssa Wilk <alyssar@chromium.org> Signed-off-by: Christoph Pakulski <christoph@tetrate.io> Co-authored-by: Christoph Pakulski <christoph@tetrate.io>
Backported to 1.16. Removing |
Fix a bug where the transport socket options for the first downstream got reused for subsequent upstream connections.
Risk Level: low
Testing: new integration test
Docs Changes: n/a
Release Notes:
Platform Specific Features:
Fixes #13659