diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2023-02-26 05:17:41 -0500 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2023-02-28 00:12:48 -0500 |
commit | 3a8fc4bc9c1d3c36fba75abf499103f028ebea13 (patch) | |
tree | 90252342463d34bbd396a88f23c94004211abd75 /src/configfile-glue.c | |
parent | 02dce5e254ba44b70e1be819f3305255535333be (diff) | |
download | lighttpd-git-3a8fc4bc9c1d3c36fba75abf499103f028ebea13.tar.gz |
[multiple] store ptrs to remote addr in request_st (#3192)
adds two pointers to (request_st *) (cost: 16 bytes in 64-bit builds)
prepares for upcoming changes to mod_extforward to manage remote addr
per request for HTTP/2 requests, rather than remote addr per connection.
Modern load balancers often provide options to reuse connections for
*different* clients, and therefore mod_extforward might change the
remote addr per request.
x-ref:
"RFE: mod_extforward and multiplexed requests via HTTP/2"
https://redmine.lighttpd.net/issues/3192
"Evaluation of remote_addr for mod_maxminddb for multiplexed connections"
https://redmine.lighttpd.net/issues/3191
Diffstat (limited to 'src/configfile-glue.c')
-rw-r--r-- | src/configfile-glue.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/configfile-glue.c b/src/configfile-glue.c index 3be1c2a0..46ad820e 100644 --- a/src/configfile-glue.c +++ b/src/configfile-glue.c @@ -496,7 +496,7 @@ static cond_result_t config_check_cond_nocache_eval(request_st * const r, const l = &r->uri.authority; break; case COMP_HTTP_REMOTE_IP: - l = &r->con->dst_addr_buf; + l = r->dst_addr_buf; break; case COMP_HTTP_SCHEME: l = &r->uri.scheme; @@ -556,8 +556,8 @@ static cond_result_t config_check_cond_nocache_eval(request_st * const r, const (((uintptr_t)dc->string.ptr + dc->string.used + 1 + 7) & ~7); int bits = ((unsigned char *)dc->string.ptr)[dc->string.used]; match ^= (bits) - ? sock_addr_is_addr_eq_bits(addr, &r->con->dst_addr, bits) - : sock_addr_is_addr_eq(addr, &r->con->dst_addr); + ? sock_addr_is_addr_eq_bits(addr, r->dst_addr, bits) + : sock_addr_is_addr_eq(addr, r->dst_addr); break; } match ^= (buffer_is_equal(l, &dc->string)); |