-
Notifications
You must be signed in to change notification settings - Fork 845
Fix %<chi> with PROXY Protocol #8893
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
Conversation
|
|
||
| if (netvc->has_proxy_protocol(reader)) { | ||
| Debug("proxyprotocol", "ioCompletionEvent: http has proxy protocol header"); | ||
| netvc->set_remote_addr(netvc->get_proxy_protocol_src_addr()); |
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.
This is the main change.
|
|
||
| if (this->has_proxy_protocol(buffer, &r)) { | ||
| Debug("proxyprotocol", "ssl has proxy protocol header"); | ||
| set_remote_addr(get_proxy_protocol_src_addr()); |
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.
This is the main change.
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.
I'm wondering if we can unify these code in the SSLNetVConnection and ProtocolProbeSessionAccept, but it's out of scope from this PR.
|
The doc of |
|
It kinda feels like this is borderline incompatible change, in that the logging behavior of %{chi} could possibly change. The odds of this happening is small, but we should consider this and make sure we don't break the compatibility contracts. |
Fix #8544.
Prior to this change, the source address in the PROXY Protocol message was set as the remote address when it was parsed.
Now,
%<chi>always represents the previous hop.