]> granicus.if.org Git - apache/commitdiff
Add the ability to access the connection level remote IP address from the
authorGraham Leggett <minfrin@apache.org>
Tue, 22 Nov 2011 13:40:58 +0000 (13:40 +0000)
committerGraham Leggett <minfrin@apache.org>
Tue, 22 Nov 2011 13:40:58 +0000 (13:40 +0000)
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

index d1199d1703095c9835a86e03c6b7db16c666c21f..ee56c519888868a77b80b28a2d78e805bb5c6f42 100644 (file)
@@ -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;