You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Nick Edwards <ni...@gmail.com> on 2012/02/23 00:52:14 UTC

[users@httpd] apache 2.4.1 and mod cband

Hi,
I know this may be a little off-topic, but am asking here because mod
cband has it seems been abandon-ware for few years now, even half the
authors I contacted have no idea about the main developers
whereabouts.

mod_cband works fantastic, except in trying 2.4.1 of apache httpd it
no longer builds.
I hope someone has an idea on as to how to fix

/usr/sbin/apxs -Wc,-Wall -Wc,-DDST_CLASS=3 -c src/mod_cband.c
/opt/apache/build/libtool --silent --mode=compile gcc -std=gnu99
-prefer-pic -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE
-g -O2 -pthread -I/usr/include/libxml2 -I/opt/apache/include
-I/opt/apache/include -I/opt/apache/include -Wall -DDST_CLASS=3 -c -o
src/mod_cband.lo src/mod_cband.c && touch src/mod_cband.slo

src/mod_cband.c: In function 'mod_cband_create_traffic_size':
src/mod_cband.c:1054: warning: comparison with string literal results
in unspecified behavior
src/mod_cband.c:1054: warning: comparison with string literal results
in unspecified behavior
src/mod_cband.c:1058: warning: comparison with string literal results
in unspecified behavior
src/mod_cband.c:1058: warning: comparison with string literal results
in unspecified behavior
src/mod_cband.c: In function 'mod_cband_get_dst':
src/mod_cband.c:1333: error: 'conn_rec' has no member named 'remote_ip'
src/mod_cband.c: In function 'mod_cband_get_remote_host':
src/mod_cband.c:1362: error: 'struct conn_rec' has no member named 'remote_ip'
src/mod_cband.c:1363: error: 'struct conn_rec' has no member named 'remote_ip'
src/mod_cband.c:1365: error: 'struct conn_rec' has no member named 'remote_addr'
apxs:Error: Command failed with rc=65536

make: *** [src/.libs/mod_cband.so] Error 1


Thanks

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apache 2.4.1 and mod cband

Posted by Nick Edwards <ni...@gmail.com>.
Awesome, thank you!


On 2/23/12, Rainer Jung <ra...@kippdata.de> wrote:
> On 23.02.2012 01:25, Eric Covener wrote:
>> On Wed, Feb 22, 2012 at 6:52 PM, Nick Edwards<ni...@gmail.com>
>> wrote:
>>> Hi,
>>> I know this may be a little off-topic, but am asking here because mod
>>> cband has it seems been abandon-ware for few years now, even half the
>>> authors I contacted have no idea about the main developers
>>> whereabouts.
>>>
>>> mod_cband works fantastic, except in trying 2.4.1 of apache httpd it
>>> no longer builds.
>>> I hope someone has an idea on as to how to fix
>>>
>>> /usr/sbin/apxs -Wc,-Wall -Wc,-DDST_CLASS=3 -c src/mod_cband.c
>>> /opt/apache/build/libtool --silent --mode=compile gcc -std=gnu99
>>> -prefer-pic -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE
>>> -g -O2 -pthread -I/usr/include/libxml2 -I/opt/apache/include
>>> -I/opt/apache/include -I/opt/apache/include -Wall -DDST_CLASS=3 -c -o
>>> src/mod_cband.lo src/mod_cband.c&&  touch src/mod_cband.slo
>>>
>>> src/mod_cband.c: In function 'mod_cband_create_traffic_size':
>>> src/mod_cband.c:1054: warning: comparison with string literal results
>>> in unspecified behavior
>>> src/mod_cband.c:1054: warning: comparison with string literal results
>>> in unspecified behavior
>>> src/mod_cband.c:1058: warning: comparison with string literal results
>>> in unspecified behavior
>>> src/mod_cband.c:1058: warning: comparison with string literal results
>>> in unspecified behavior
>>> src/mod_cband.c: In function 'mod_cband_get_dst':
>>> src/mod_cband.c:1333: error: 'conn_rec' has no member named 'remote_ip'
>>> src/mod_cband.c: In function 'mod_cband_get_remote_host':
>>> src/mod_cband.c:1362: error: 'struct conn_rec' has no member named
>>> 'remote_ip'
>>> src/mod_cband.c:1363: error: 'struct conn_rec' has no member named
>>> 'remote_ip'
>>> src/mod_cband.c:1365: error: 'struct conn_rec' has no member named
>>> 'remote_addr'
>>> apxs:Error: Command failed with rc=65536
>>>
>>
>> Apache 2.4 splits the "remote_ip" into a client IP (TCP peer) and a
>> useragent_ip (e.g. X-Forwarded-For)
>>
>> Arbitrarily choosing the former for mod_cband lets it build:
>>
>> http://apache.pastebin.ca/2120923
>> http://httpd.apache.org/docs/2.4/developer/new_api_2_4.html
>
> ... and for very simple tasks you might want to have a look at
> mod_ratelimit, which is bundled with 2.4. Improvements welcome ;)
>
> Regards,
>
> Rainer
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apache 2.4.1 and mod cband

Posted by Rainer Jung <ra...@kippdata.de>.
On 23.02.2012 13:35, Nick Edwards wrote:
> On 2/23/12, Rainer Jung<ra...@kippdata.de>  wrote:
>> On 23.02.2012 01:25, Eric Covener wrote:
>>> On Wed, Feb 22, 2012 at 6:52 PM, Nick Edwards<ni...@gmail.com>
>>> wrote:
>>>> Hi,
>>>> I know this may be a little off-topic, but am asking here because mod
>>>> cband has it seems been abandon-ware for few years now, even half the
>>>> authors I contacted have no idea about the main developers
>>>> whereabouts.
>>>>
>>>> mod_cband works fantastic, except in trying 2.4.1 of apache httpd it
>>>> no longer builds.
>>>> I hope someone has an idea on as to how to fix
>>>>
>>>> /usr/sbin/apxs -Wc,-Wall -Wc,-DDST_CLASS=3 -c src/mod_cband.c
>>>> /opt/apache/build/libtool --silent --mode=compile gcc -std=gnu99
>>>> -prefer-pic -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE
>>>> -g -O2 -pthread -I/usr/include/libxml2 -I/opt/apache/include
>>>> -I/opt/apache/include -I/opt/apache/include -Wall -DDST_CLASS=3 -c -o
>>>> src/mod_cband.lo src/mod_cband.c&&   touch src/mod_cband.slo
>>>>
>>>> src/mod_cband.c: In function 'mod_cband_create_traffic_size':
>>>> src/mod_cband.c:1054: warning: comparison with string literal results
>>>> in unspecified behavior
>>>> src/mod_cband.c:1054: warning: comparison with string literal results
>>>> in unspecified behavior
>>>> src/mod_cband.c:1058: warning: comparison with string literal results
>>>> in unspecified behavior
>>>> src/mod_cband.c:1058: warning: comparison with string literal results
>>>> in unspecified behavior
>>>> src/mod_cband.c: In function 'mod_cband_get_dst':
>>>> src/mod_cband.c:1333: error: 'conn_rec' has no member named 'remote_ip'
>>>> src/mod_cband.c: In function 'mod_cband_get_remote_host':
>>>> src/mod_cband.c:1362: error: 'struct conn_rec' has no member named
>>>> 'remote_ip'
>>>> src/mod_cband.c:1363: error: 'struct conn_rec' has no member named
>>>> 'remote_ip'
>>>> src/mod_cband.c:1365: error: 'struct conn_rec' has no member named
>>>> 'remote_addr'
>>>> apxs:Error: Command failed with rc=65536
>>>>
>>>
>>> Apache 2.4 splits the "remote_ip" into a client IP (TCP peer) and a
>>> useragent_ip (e.g. X-Forwarded-For)
>>>
>>> Arbitrarily choosing the former for mod_cband lets it build:
>>>
>>> http://apache.pastebin.ca/2120923
>>> http://httpd.apache.org/docs/2.4/developer/new_api_2_4.html
>>
>> ... and for very simple tasks you might want to have a look at
>> mod_ratelimit, which is bundled with 2.4. Improvements welcome ;)
>
> Would be fantastic if it did similar to cband though, we really only
> use it for quota limits on hosts, any future plans?

Not yet, it might be driven by contributions :)

Note that the bandwidth limit enforced by mod_ratelimit isn't configured 
as a hard limit, but can be set as an Apache environment variable. That 
means it is very flexible. You can set it individually for VHosts or 
Locations/Diroetories or even using mod_rewrite depending on request 
attributes.

Disclaimer: Haven't used it yet myself, just judging from looking at the 
code and docs.

Regards,

Rainer

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apache 2.4.1 and mod cband

Posted by Nick Edwards <ni...@gmail.com>.
On 2/23/12, Rainer Jung <ra...@kippdata.de> wrote:
> On 23.02.2012 01:25, Eric Covener wrote:
>> On Wed, Feb 22, 2012 at 6:52 PM, Nick Edwards<ni...@gmail.com>
>> wrote:
>>> Hi,
>>> I know this may be a little off-topic, but am asking here because mod
>>> cband has it seems been abandon-ware for few years now, even half the
>>> authors I contacted have no idea about the main developers
>>> whereabouts.
>>>
>>> mod_cband works fantastic, except in trying 2.4.1 of apache httpd it
>>> no longer builds.
>>> I hope someone has an idea on as to how to fix
>>>
>>> /usr/sbin/apxs -Wc,-Wall -Wc,-DDST_CLASS=3 -c src/mod_cband.c
>>> /opt/apache/build/libtool --silent --mode=compile gcc -std=gnu99
>>> -prefer-pic -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE
>>> -g -O2 -pthread -I/usr/include/libxml2 -I/opt/apache/include
>>> -I/opt/apache/include -I/opt/apache/include -Wall -DDST_CLASS=3 -c -o
>>> src/mod_cband.lo src/mod_cband.c&&  touch src/mod_cband.slo
>>>
>>> src/mod_cband.c: In function 'mod_cband_create_traffic_size':
>>> src/mod_cband.c:1054: warning: comparison with string literal results
>>> in unspecified behavior
>>> src/mod_cband.c:1054: warning: comparison with string literal results
>>> in unspecified behavior
>>> src/mod_cband.c:1058: warning: comparison with string literal results
>>> in unspecified behavior
>>> src/mod_cband.c:1058: warning: comparison with string literal results
>>> in unspecified behavior
>>> src/mod_cband.c: In function 'mod_cband_get_dst':
>>> src/mod_cband.c:1333: error: 'conn_rec' has no member named 'remote_ip'
>>> src/mod_cband.c: In function 'mod_cband_get_remote_host':
>>> src/mod_cband.c:1362: error: 'struct conn_rec' has no member named
>>> 'remote_ip'
>>> src/mod_cband.c:1363: error: 'struct conn_rec' has no member named
>>> 'remote_ip'
>>> src/mod_cband.c:1365: error: 'struct conn_rec' has no member named
>>> 'remote_addr'
>>> apxs:Error: Command failed with rc=65536
>>>
>>
>> Apache 2.4 splits the "remote_ip" into a client IP (TCP peer) and a
>> useragent_ip (e.g. X-Forwarded-For)
>>
>> Arbitrarily choosing the former for mod_cband lets it build:
>>
>> http://apache.pastebin.ca/2120923
>> http://httpd.apache.org/docs/2.4/developer/new_api_2_4.html
>
> ... and for very simple tasks you might want to have a look at
> mod_ratelimit, which is bundled with 2.4. Improvements welcome ;)

Would be fantastic if it did similar to cband though, we really only
use it for quota limits on hosts, any future plans?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apache 2.4.1 and mod cband

Posted by Rainer Jung <ra...@kippdata.de>.
On 23.02.2012 01:25, Eric Covener wrote:
> On Wed, Feb 22, 2012 at 6:52 PM, Nick Edwards<ni...@gmail.com>  wrote:
>> Hi,
>> I know this may be a little off-topic, but am asking here because mod
>> cband has it seems been abandon-ware for few years now, even half the
>> authors I contacted have no idea about the main developers
>> whereabouts.
>>
>> mod_cband works fantastic, except in trying 2.4.1 of apache httpd it
>> no longer builds.
>> I hope someone has an idea on as to how to fix
>>
>> /usr/sbin/apxs -Wc,-Wall -Wc,-DDST_CLASS=3 -c src/mod_cband.c
>> /opt/apache/build/libtool --silent --mode=compile gcc -std=gnu99
>> -prefer-pic -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE
>> -g -O2 -pthread -I/usr/include/libxml2 -I/opt/apache/include
>> -I/opt/apache/include -I/opt/apache/include -Wall -DDST_CLASS=3 -c -o
>> src/mod_cband.lo src/mod_cband.c&&  touch src/mod_cband.slo
>>
>> src/mod_cband.c: In function 'mod_cband_create_traffic_size':
>> src/mod_cband.c:1054: warning: comparison with string literal results
>> in unspecified behavior
>> src/mod_cband.c:1054: warning: comparison with string literal results
>> in unspecified behavior
>> src/mod_cband.c:1058: warning: comparison with string literal results
>> in unspecified behavior
>> src/mod_cband.c:1058: warning: comparison with string literal results
>> in unspecified behavior
>> src/mod_cband.c: In function 'mod_cband_get_dst':
>> src/mod_cband.c:1333: error: 'conn_rec' has no member named 'remote_ip'
>> src/mod_cband.c: In function 'mod_cband_get_remote_host':
>> src/mod_cband.c:1362: error: 'struct conn_rec' has no member named 'remote_ip'
>> src/mod_cband.c:1363: error: 'struct conn_rec' has no member named 'remote_ip'
>> src/mod_cband.c:1365: error: 'struct conn_rec' has no member named 'remote_addr'
>> apxs:Error: Command failed with rc=65536
>>
>
> Apache 2.4 splits the "remote_ip" into a client IP (TCP peer) and a
> useragent_ip (e.g. X-Forwarded-For)
>
> Arbitrarily choosing the former for mod_cband lets it build:
>
> http://apache.pastebin.ca/2120923
> http://httpd.apache.org/docs/2.4/developer/new_api_2_4.html

... and for very simple tasks you might want to have a look at 
mod_ratelimit, which is bundled with 2.4. Improvements welcome ;)

Regards,

Rainer

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apache 2.4.1 and mod cband

Posted by Eric Covener <co...@gmail.com>.
On Wed, Feb 22, 2012 at 6:52 PM, Nick Edwards <ni...@gmail.com> wrote:
> Hi,
> I know this may be a little off-topic, but am asking here because mod
> cband has it seems been abandon-ware for few years now, even half the
> authors I contacted have no idea about the main developers
> whereabouts.
>
> mod_cband works fantastic, except in trying 2.4.1 of apache httpd it
> no longer builds.
> I hope someone has an idea on as to how to fix
>
> /usr/sbin/apxs -Wc,-Wall -Wc,-DDST_CLASS=3 -c src/mod_cband.c
> /opt/apache/build/libtool --silent --mode=compile gcc -std=gnu99
> -prefer-pic -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE
> -g -O2 -pthread -I/usr/include/libxml2 -I/opt/apache/include
> -I/opt/apache/include -I/opt/apache/include -Wall -DDST_CLASS=3 -c -o
> src/mod_cband.lo src/mod_cband.c && touch src/mod_cband.slo
>
> src/mod_cband.c: In function 'mod_cband_create_traffic_size':
> src/mod_cband.c:1054: warning: comparison with string literal results
> in unspecified behavior
> src/mod_cband.c:1054: warning: comparison with string literal results
> in unspecified behavior
> src/mod_cband.c:1058: warning: comparison with string literal results
> in unspecified behavior
> src/mod_cband.c:1058: warning: comparison with string literal results
> in unspecified behavior
> src/mod_cband.c: In function 'mod_cband_get_dst':
> src/mod_cband.c:1333: error: 'conn_rec' has no member named 'remote_ip'
> src/mod_cband.c: In function 'mod_cband_get_remote_host':
> src/mod_cband.c:1362: error: 'struct conn_rec' has no member named 'remote_ip'
> src/mod_cband.c:1363: error: 'struct conn_rec' has no member named 'remote_ip'
> src/mod_cband.c:1365: error: 'struct conn_rec' has no member named 'remote_addr'
> apxs:Error: Command failed with rc=65536
>

Apache 2.4 splits the "remote_ip" into a client IP (TCP peer) and a
useragent_ip (e.g. X-Forwarded-For)

Arbitrarily choosing the former for mod_cband lets it build:

http://apache.pastebin.ca/2120923
http://httpd.apache.org/docs/2.4/developer/new_api_2_4.html

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apache 2.4.1 and mod cband

Posted by Jeff Trawick <tr...@gmail.com>.
On Wed, Feb 22, 2012 at 6:52 PM, Nick Edwards <ni...@gmail.com> wrote:
> Hi,
> I know this may be a little off-topic, but am asking here because mod
> cband has it seems been abandon-ware for few years now, even half the
> authors I contacted have no idea about the main developers
> whereabouts.
>
> mod_cband works fantastic, except in trying 2.4.1 of apache httpd it
> no longer builds.
> I hope someone has an idea on as to how to fix
>
> /usr/sbin/apxs -Wc,-Wall -Wc,-DDST_CLASS=3 -c src/mod_cband.c
> /opt/apache/build/libtool --silent --mode=compile gcc -std=gnu99
> -prefer-pic -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE
> -g -O2 -pthread -I/usr/include/libxml2 -I/opt/apache/include
> -I/opt/apache/include -I/opt/apache/include -Wall -DDST_CLASS=3 -c -o
> src/mod_cband.lo src/mod_cband.c && touch src/mod_cband.slo
>
> src/mod_cband.c: In function 'mod_cband_create_traffic_size':
> src/mod_cband.c:1054: warning: comparison with string literal results
> in unspecified behavior
> src/mod_cband.c:1054: warning: comparison with string literal results
> in unspecified behavior
> src/mod_cband.c:1058: warning: comparison with string literal results
> in unspecified behavior
> src/mod_cband.c:1058: warning: comparison with string literal results
> in unspecified behavior
> src/mod_cband.c: In function 'mod_cband_get_dst':
> src/mod_cband.c:1333: error: 'conn_rec' has no member named 'remote_ip'
> src/mod_cband.c: In function 'mod_cband_get_remote_host':
> src/mod_cband.c:1362: error: 'struct conn_rec' has no member named 'remote_ip'
> src/mod_cband.c:1363: error: 'struct conn_rec' has no member named 'remote_ip'
> src/mod_cband.c:1365: error: 'struct conn_rec' has no member named 'remote_addr'

look for "remote_ip" here:

http://httpd.apache.org/docs/trunk/developer/new_api_2_4.html#upgrading

it should be very simple to fix

> apxs:Error: Command failed with rc=65536
>
> make: *** [src/.libs/mod_cband.so] Error 1
>
>
> Thanks
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>



-- 
Born in Roswell... married an alien...

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org