From 7df4fb353735eaa9ec4bd5f14767284892b80576 Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Tue, 22 Nov 2011 13:40:58 +0000 Subject: [PATCH] Add the ability to access the connection level remote IP address from the expression parser. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1204990 13f79535-47bb-0310-9956-ffa450edef68 --- server/util_expr_eval.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/util_expr_eval.c b/server/util_expr_eval.c index d1199d1703..ee56c51988 100644 --- a/server/util_expr_eval.c +++ b/server/util_expr_eval.c @@ -1184,6 +1184,7 @@ static const char *conn_var_names[] = { "HTTPS", /* 0 */ "IPV6", /* 1 */ "CONN_LOG_ID", /* 2 */ + "CONN_REMOTE_ADDR", /* 3 */ NULL }; @@ -1215,6 +1216,8 @@ static const char *conn_var_fn(ap_expr_eval_ctx_t *ctx, const void *data) #endif case 2: return c->log_id; + case 3: + return c->remote_ip; default: ap_assert(0); return NULL; -- 2.40.0