summaryrefslogtreecommitdiff
path: root/src/mod_auth.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2023-02-26 05:17:41 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2023-02-28 00:12:48 -0500
commit3a8fc4bc9c1d3c36fba75abf499103f028ebea13 (patch)
tree90252342463d34bbd396a88f23c94004211abd75 /src/mod_auth.c
parent02dce5e254ba44b70e1be819f3305255535333be (diff)
downloadlighttpd-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/mod_auth.c')
-rw-r--r--src/mod_auth.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mod_auth.c b/src/mod_auth.c
index bf4b028f..0cd88c9a 100644
--- a/src/mod_auth.c
+++ b/src/mod_auth.c
@@ -849,7 +849,7 @@ mod_auth_check_basic(request_st * const r, void *p_d, const struct http_auth_req
default:
log_error(r->conf.errh, __FILE__, __LINE__,
"password doesn't match for %s username: %s IP: %s",
- r->uri.path.ptr, user, r->con->dst_addr_buf.ptr);
+ r->uri.path.ptr, user, r->dst_addr_buf->ptr);
r->keep_alive = -1; /*(disable keep-alive if bad password)*/
rc = mod_auth_send_401_unauthorized_basic(r, require->realm);
break;
@@ -1420,7 +1420,7 @@ mod_auth_digest_validate_params (request_st * const r, const struct http_auth_re
log_error(r->conf.errh, __FILE__, __LINE__,
"digest: auth failed: uri mismatch (%s != %.*s), IP: %s",
r->target_orig.ptr, (int)dp->len[e_uri], dp->ptr[e_uri],
- r->con->dst_addr_buf.ptr);
+ r->dst_addr_buf->ptr);
return mod_auth_send_400_bad_request(r);
}
@@ -1533,7 +1533,7 @@ mod_auth_check_digest (request_st * const r, void *p_d, const struct http_auth_r
/* digest not ok */
log_error(r->conf.errh, __FILE__, __LINE__,
"digest: auth failed for %.*s: wrong password, IP: %s",
- (int)ai.ulen, ai.username, r->con->dst_addr_buf.ptr);
+ (int)ai.ulen, ai.username, r->dst_addr_buf->ptr);
r->keep_alive = -1; /*(disable keep-alive if bad password)*/
return mod_auth_send_401_unauthorized_digest(r, require, 0);
}