From 0f2aad26747a1ed795d8b19506def3cc7b6549f6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Sun, 5 May 2013 20:13:39 +0200 Subject: [PATCH] - build with apache 2.4 - rel 5 --- apache-mod_bw.spec | 4 +++- mod_bw-apache24.patch | 31 +++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 mod_bw-apache24.patch diff --git a/apache-mod_bw.spec b/apache-mod_bw.spec index 0cc9a44..0ec2915 100644 --- a/apache-mod_bw.spec +++ b/apache-mod_bw.spec @@ -6,13 +6,14 @@ Summary: Apache module: bandwidth limits Summary(pl.UTF-8): Moduł do Apache: limity pasma Name: apache-mod_%{mod_name} Version: 0.92 -Release: 4 +Release: 5 License: Apache v2.0 Group: Networking/Daemons/HTTP Source0: http://ivn.cl/files/source/mod_bw-%{version}.tgz # Source0-md5: 90f5e632dad5de8d49dcdb61453dcf97 Source1: %{name}.conf Source2: %{name}.tmpfiles +Patch0: mod_bw-apache24.patch URL: http://www.ivn.cl/apache/ BuildRequires: %{apxs} BuildRequires: apache-devel >= 2.0.0 @@ -37,6 +38,7 @@ katalogu, wielkości plików lub zdalnym IP/domenie. %prep %setup -qc +%patch0 -p1 %build %{apxs} -c mod_bw.c diff --git a/mod_bw-apache24.patch b/mod_bw-apache24.patch new file mode 100644 index 0000000..0d9e8c3 --- /dev/null +++ b/mod_bw-apache24.patch @@ -0,0 +1,31 @@ +diff --git a/mod_bw.c b/mod_bw.c +index a49caf8..8b75973 100644 +--- a/mod_bw.c ++++ b/mod_bw.c +@@ -519,7 +519,7 @@ static long get_bw_rate(request_rec * r, apr_array_header_t * a) + return e[i].rate; + + case T_IP: +- if (apr_ipsubnet_test(e[i].x.ip, r->connection->remote_addr)) { ++ if (apr_ipsubnet_test(e[i].x.ip, r->useragent_addr)) { + return e[i].rate; + } + break; +@@ -608,7 +608,7 @@ static int get_maxconn(request_rec * r, apr_array_header_t * a) + return e[i].max; + + case T_IP: +- if (apr_ipsubnet_test(e[i].x.ip, r->connection->remote_addr)) { ++ if (apr_ipsubnet_test(e[i].x.ip, r->useragent_addr)) { + return e[i].max; + } + break; +@@ -659,7 +659,7 @@ static int get_sid(request_rec * r, apr_array_header_t * a) + return e[i].sid; + + case T_IP: +- if (apr_ipsubnet_test(e[i].x.ip, r->connection->remote_addr)) { ++ if (apr_ipsubnet_test(e[i].x.ip, r->useragent_addr)) { + return e[i].sid; + } + break; -- 2.44.0