Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 575315 Details for
Bug 810114
Fix compilation with httpd-2.4
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
proposed patch
0001-Fix-compilation-with-httpd-2.4.patch (text/plain), 6.97 KB, created by
Jan Kaluža
on 2012-04-05 08:15:46 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Jan Kaluža
Created:
2012-04-05 08:15:46 UTC
Size:
6.97 KB
patch
obsolete
>From d4bcf6d26536095777ed610a1139b41bdc615c96 Mon Sep 17 00:00:00 2001 >From: Jan Kaluza <hanzz.k@gmail.com> >Date: Thu, 5 Apr 2012 09:05:54 +0200 >Subject: [PATCH] Fix compilation with httpd-2.4 > >--- > mod_cband-httpd24.patch | 72 +++++++++++++++++++++++++++++++++++++++++++++++ > mod_cband.conf | 12 ++++--- > mod_cband.module.conf | 5 +++ > mod_cband.spec | 16 +++++++++- > 4 files changed, 98 insertions(+), 7 deletions(-) > create mode 100644 mod_cband-httpd24.patch > create mode 100644 mod_cband.module.conf > >diff --git a/mod_cband-httpd24.patch b/mod_cband-httpd24.patch >new file mode 100644 >index 0000000..1871501 >--- /dev/null >+++ b/mod_cband-httpd24.patch >@@ -0,0 +1,72 @@ >+diff --git a/src/mod_cband.c b/src/mod_cband.c >+index 713e147..ee6ec75 100644 >+--- a/src/mod_cband.c >++++ b/src/mod_cband.c >+@@ -1330,7 +1330,7 @@ int mod_cband_get_dst(request_rec *r) >+ p.bitlen = 32; >+ p.ref_count = 0; >+ p.family = AF_INET; >+- p.add.sin.s_addr = inet_addr(r->connection->remote_ip); >++ p.add.sin.s_addr = inet_addr(r->useragent_ip); >+ >+ node = patricia_search_best(config->tree, &p); >+ >+@@ -1339,7 +1339,7 @@ int mod_cband_get_dst(request_rec *r) >+ >+ if (leaf) { >+ #ifdef DEBUG >+- fprintf(stderr,"%s leaf %s\n",r->connection->remote_ip,leaf); >++ fprintf(stderr,"%s leaf %s\n",r->useragent_ip,leaf); >+ fflush(stderr); >+ #endif >+ return atoi(leaf); >+@@ -1349,7 +1349,7 @@ int mod_cband_get_dst(request_rec *r) >+ return -1; >+ } >+ >+-int mod_cband_get_remote_host(struct conn_rec *c, int create, mod_cband_virtualhost_config_entry *entry) >++int mod_cband_get_remote_host(request_rec *r, int create, mod_cband_virtualhost_config_entry *entry) >+ { >+ int i; >+ mod_cband_remote_host *hosts; >+@@ -1359,10 +1359,10 @@ int mod_cband_get_remote_host(struct conn_rec *c, int create, mod_cband_virtualh >+ if (entry == NULL) >+ return -1; >+ >+- if (c->remote_ip != NULL) >+- addr = inet_addr(c->remote_ip); >++ if (r->useragent_ip != NULL) >++ addr = inet_addr(r->useragent_ip); >+ else >+- addr = c->remote_addr->sa.sin.sin_addr.s_addr; >++ addr = r->useragent_addr->sa.sin.sin_addr.s_addr; >+ >+ time_now = apr_time_now(); >+ hosts = config->remote_hosts.hosts; >+@@ -2964,7 +2964,7 @@ int mod_cband_check_connections_speed(mod_cband_virtualhost_config_entry *entry, >+ int loops; >+ int overlimit; >+ >+- remote_idx = mod_cband_get_remote_host(r->connection, 1, entry); >++ remote_idx = mod_cband_get_remote_host(r, 1, entry); >+ mod_cband_get_dst_speed_lock(entry, entry_user, &max_remote_kbps, &remote_curr_rps, &remote_max_conn, dst); >+ mod_cband_set_remote_max_connections(remote_idx, remote_max_conn); >+ >+@@ -3078,7 +3078,7 @@ static int mod_cband_status_handler (request_rec *r) >+ entry_user = mod_cband_get_user_entry(entry->virtual_user, r->server->module_config, 0); >+ >+ dst = mod_cband_get_dst(r); >+- remote_idx = mod_cband_get_remote_host(r->connection, 1, entry); >++ remote_idx = mod_cband_get_remote_host(r, 1, entry); >+ mod_cband_get_dst_speed_lock(entry, entry_user, NULL, NULL, &remote_max_conn, dst); >+ mod_cband_set_remote_max_connections(remote_idx, remote_max_conn); >+ >+@@ -3441,7 +3441,7 @@ static int mod_cband_filter(ap_filter_t *f, apr_bucket_brigade *bb) >+ >+ if ((entry = mod_cband_get_virtualhost_entry(f->r->server, f->r->server->module_config, 0)) != NULL) { >+ mod_cband_flush_score_lock(entry->virtual_scoreboard, &(entry->shmem_data->total_usage)); >+- remote_idx = mod_cband_get_remote_host(f->r->connection, 1, entry); >++ remote_idx = mod_cband_get_remote_host(f->r, 1, entry); >+ mod_cband_update_speed_lock(entry->shmem_data, 0, 1, remote_idx); >+ } >+ >diff --git a/mod_cband.conf b/mod_cband.conf >index 3296056..0851f7e 100644 >--- a/mod_cband.conf >+++ b/mod_cband.conf >@@ -1,17 +1,19 @@ > > # This is an example config for the mod_cband bandwidth limiting module > >-# Load the module >-LoadModule cband_module modules/mod_cband.so >- > # This can will give you the bandwidth status. You can append "?xml" to > # the end of the URI if you have an XML fetish (weirdo!) and want to see > # it in that format. > > <Location /cband-status> > SetHandler cband-status >-Order allow,deny >-Allow from 127.0.0.1/32 >+<IfModule mod_authz_core.c> >+ Require ip 127.0.0.1/32 >+</IfModule> >+<IfModule !mod_authz_core.c> >+ Order allow,deny >+ Allow from 127.0.0.1/32 >+</IfModule> > </Location> > > # This space intentionally left commented. See the docs for more examples, >diff --git a/mod_cband.module.conf b/mod_cband.module.conf >new file mode 100644 >index 0000000..20bffc4 >--- /dev/null >+++ b/mod_cband.module.conf >@@ -0,0 +1,5 @@ >+ >+# This is an example config for the mod_cband bandwidth limiting module >+ >+# Load the module >+LoadModule cband_module modules/mod_cband.so >diff --git a/mod_cband.spec b/mod_cband.spec >index 279fbc7..d114f45 100644 >--- a/mod_cband.spec >+++ b/mod_cband.spec >@@ -1,15 +1,21 @@ >+%{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}} >+%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn || echo missing-httpd-devel)}} >+ > Name: mod_cband > Version: 0.9.7.5 >-Release: 7%{?dist} >+Release: 8%{?dist} > Summary: Bandwidth limiting for virtual hosts > Group: System Environment/Daemons > License: GPLv2+ > URL: http://cband.linux.pl/ > Source0: http://cband.linux.pl/download/mod-cband-%{version}.tgz > Source1: mod_cband.conf >+Source2: mod_cband.module.conf >+Patch0: mod_cband-httpd24.patch > BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) > BuildRequires: httpd-devel >-Requires: httpd httpd-mmn = %([ -a %{_includedir}/httpd/.mmn ] && cat %{_includedir}/httpd/.mmn || echo missing) >+Requires: httpd-mmn = %{_httpd_mmn} >+Requires: httpd > > %description > mod_cband is an Apache 2 module provided to solve the problem of limiting >@@ -20,6 +26,7 @@ specified in the configuration file. > > %prep > %setup -q -n mod-cband-%{version} >+%patch0 -p1 -b .httpd24 > > > %build >@@ -30,6 +37,7 @@ make %{?_smp_mflags} > rm -rf %{buildroot} > install -D -m755 src/.libs/mod_cband.so %{buildroot}/%{_libdir}/httpd/modules/mod_cband.so > install -D -m644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/httpd/conf.d/mod_cband.conf >+install -D -m644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/httpd/conf.modules.d/02-mod_cband.conf > > %clean > rm -rf %{buildroot} >@@ -40,8 +48,12 @@ rm -rf %{buildroot} > %doc AUTHORS Changes INSTALL LICENSE conf *.copyright > %{_libdir}/httpd/modules/mod_cband.so > %config(noreplace) %{_sysconfdir}/httpd/conf.d/mod_cband.conf >+%config(noreplace) %{_sysconfdir}/httpd/conf.modules.d/02-mod_cband.conf > > %changelog >+* Thu Apr 05 2012 Jan Kaluza <jkaluza@redhat.com> - 0.9.7.5-8 >+- fix compilation with httpd-2.4 >+ > * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.7.5-7 > - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild > >-- >1.7.7.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 810114
: 575315