]> git.pld-linux.org Git - packages/apache-mod_rpaf.git/commitdiff
- build with apache 2.4 auto/th/apache-mod_rpaf-0.6-3
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 5 May 2013 20:02:40 +0000 (22:02 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 5 May 2013 20:02:40 +0000 (22:02 +0200)
- rel 3

apache-mod_rpaf-apache24.patch [new file with mode: 0644]
apache-mod_rpaf.spec

diff --git a/apache-mod_rpaf-apache24.patch b/apache-mod_rpaf-apache24.patch
new file mode 100644 (file)
index 0000000..11a2cba
--- /dev/null
@@ -0,0 +1,37 @@
+--- mod_rpaf-0.6/mod_rpaf.c.orig       2013-05-05 21:59:10.551469220 +0200
++++ mod_rpaf-0.6/mod_rpaf.c    2013-05-05 22:00:23.974802023 +0200
+@@ -147,8 +147,8 @@
+ static apr_status_t rpaf_cleanup(void *data) {
+     rpaf_cleanup_rec *rcr = (rpaf_cleanup_rec *)data;
+-    rcr->r->connection->remote_ip   = apr_pstrdup(rcr->r->connection->pool, rcr->old_ip);
+-    rcr->r->connection->remote_addr->sa.sin.sin_addr.s_addr = apr_inet_addr(rcr->r->connection->remote_ip);
++    rcr->r->connection->client_ip   = apr_pstrdup(rcr->r->connection->pool, rcr->old_ip);
++    rcr->r->useragent_addr->sa.sin.sin_addr.s_addr = apr_inet_addr(rcr->r->connection->client_ip);
+     return APR_SUCCESS;
+ }
+@@ -171,7 +171,7 @@
+     if (!cfg->enable)
+         return DECLINED;
+-    if (is_in_array(r->connection->remote_ip, cfg->proxy_ips) == 1) {
++    if (is_in_array(r->connection->client_ip, cfg->proxy_ips) == 1) {
+         /* check if cfg->headername is set and if it is use
+            that instead of X-Forwarded-For by default */
+         if (cfg->headername && (fwdvalue = apr_table_get(r->headers_in, cfg->headername))) {
+@@ -190,11 +190,11 @@
+                 if (*fwdvalue != '\0')
+                     ++fwdvalue;
+             }
+-            rcr->old_ip = apr_pstrdup(r->connection->pool, r->connection->remote_ip);
++            rcr->old_ip = apr_pstrdup(r->connection->pool, r->connection->client_ip);
+             rcr->r = r;
+             apr_pool_cleanup_register(r->pool, (void *)rcr, rpaf_cleanup, apr_pool_cleanup_null);
+-            r->connection->remote_ip = apr_pstrdup(r->connection->pool, last_not_in_array(arr, cfg->proxy_ips));
+-            r->connection->remote_addr->sa.sin.sin_addr.s_addr = apr_inet_addr(r->connection->remote_ip);
++            r->connection->client_ip = apr_pstrdup(r->connection->pool, last_not_in_array(arr, cfg->proxy_ips));
++            r->useragent_addr->sa.sin.sin_addr.s_addr = apr_inet_addr(r->connection->client_ip);
+             if (cfg->sethostname) {
+                 const char *hostvalue;
+                 if (hostvalue = apr_table_get(r->headers_in, "X-Forwarded-Host")) {
index cf1e3db65dbd59535c2c433d214134ce301a7f0c..70633b69e6442a0fbc8fe0893566a4b6acf21ba1 100644 (file)
@@ -1,16 +1,17 @@
 %define                mod_name        rpaf
-%define        apxs            %{_sbindir}/apxs
+%define                apxs            %{_sbindir}/apxs
 Summary:       Reverse proxy add forward module for Apache2
 Summary(pl.UTF-8):     Moduł Apache'a 2 dodający przekazywanie dla odwrotnych proxy
 Name:          apache-mod_%{mod_name}
 Version:       0.6
-Release:       2
+Release:       3
 License:       Apache
 Group:         Networking/Daemons/HTTP
 Source0:       http://stderr.net/apache/rpaf/download/mod_%{mod_name}-%{version}.tar.gz
 # Source0-md5: ba2b89274e1dd4c0f96f8d034fa305b1
 Source1:       %{name}.conf
 Patch0:                mod_rpaf_degtine.patch
+Patch1:                apache-mod_rpaf-apache24.patch
 URL:           http://stderr.net/apache/rpaf/
 BuildRequires: apache-devel >= 2.2
 BuildRequires: rpmbuild(macros) >= 1.268
@@ -45,6 +46,7 @@ począwszy od wersji 2.0.36.
 %setup -q -n mod_%{mod_name}-%{version}
 %patch0 -p1
 mv -f mod_%{mod_name}{-2.0,}.c
+%patch1 -p1
 
 %build
 %{apxs} -S CC="%{__cc}" -c -n mod_%{mod_name}.o mod_%{mod_name}.c
This page took 0.072505 seconds and 4 git commands to generate.