Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compilation error Apache 2.4.25 #8

Open
drzraf opened this issue Sep 14, 2017 · 3 comments
Open

compilation error Apache 2.4.25 #8

drzraf opened this issue Sep 14, 2017 · 3 comments

Comments

@drzraf
Copy link

drzraf commented Sep 14, 2017

/usr/share/apr-1.0/build/libtool --mode=compile --tag=disable-static x86_64-linux-gnu-gcc -prefer-pic -pipe -g -O2 -fdebug-prefix-map=/build/apache2-2.4.25=. -fstack-protector-strong -Wformat -Werror=format-security -DBUILD_DATETIME='"2017-07-18T18:37:33"' -Wdate-time -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/apache2 -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include -c -o mod_evasive20.lo mod_evasive20.c && touch mod_evasive20.slo

libtool: compile: x86_64-linux-gnu-gcc -pipe -g -O2 -fdebug-prefix-map=/build/apache2-2.4.25=. -fstack-protector-strong -Wformat -Werror=format-security -DBUILD_DATETIME=\"2017-07-18T18:37:33\" -Wdate-time -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/apache2 -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include -c mod_evasive20.c -fPIC -DPIC -o .libs/mod_evasive20.o

mod_evasive20.c: In function ‘access_checker’:
mod_evasive20.c:142:39: error: ‘conn_rec {aka struct conn_rec}’ has no member named ‘remote_ip’; did you mean ‘remote_host’?
       if (is_whitelisted(r->connection->remote_ip))
                                       ^~
mod_evasive20.c:146:43: error: ‘conn_rec {aka struct conn_rec}’ has no member named ‘remote_ip’; did you mean ‘remote_host’?
       n = ntt_find(hit_list, r->connection->remote_ip);
                                           ^~
mod_evasive20.c:158:56: error: ‘conn_rec {aka struct conn_rec}’ has no member named ‘remote_ip’; did you mean ‘remote_host’?
         snprintf(hash_key, 2048, "%s_%s", r->connection->remote_ip, r->uri);
                                                        ^~
mod_evasive20.c:165:47: error: ‘conn_rec {aka struct conn_rec}’ has no member named ‘remote_ip’; did you mean ‘remote_host’?
             ntt_insert(hit_list, r->connection->remote_ip, time(NULL));
                                               ^~
mod_evasive20.c:180:58: error: ‘conn_rec {aka struct conn_rec}’ has no member named ‘remote_ip’; did you mean ‘remote_host’?
         snprintf(hash_key, 2048, "%s_SITE", r->connection->remote_ip);
                                                          ^~
mod_evasive20.c:187:47: error: ‘conn_rec {aka struct conn_rec}’ has no member named ‘remote_ip’; did you mean ‘remote_host’?
             ntt_insert(hit_list, r->connection->remote_ip, time(NULL));
                                               ^~
mod_evasive20.c:208:117: error: ‘conn_rec {aka struct conn_rec}’ has no member named ‘remote_ip’; did you mean ‘remote_host’?
         snprintf(filename, sizeof(filename), "%s/dos-%s", log_dir != NULL ? log_dir : DEFAULT_LOG_DIR, r->connection->remote_ip);
                                                                                                                     ^~
mod_evasive20.c:212:36: warning: implicit declaration of function ‘getpid’ [-Wimplicit-function-declaration]
             fprintf(file, "%ld\n", getpid());
                                    ^~~~~~
mod_evasive20.c:212:30: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘int’ [-Wformat=]
             fprintf(file, "%ld\n", getpid());
                              ^
mod_evasive20.c:215:90: error: ‘conn_rec {aka struct conn_rec}’ has no member named ‘remote_ip’; did you mean ‘remote_host’?
             LOG(LOG_ALERT, "Blacklisting address %s: possible DoS attack.", r->connection->remote_ip);
                                                                                          ^
mod_evasive20.c:46:82: note: in definition of macro ‘LOG’
 #define  LOG( A, ... ) { openlog("mod_evasive", LOG_PID, LOG_DAEMON); syslog( A, __VA_ARGS__ ); closelog(); }
                                                                                  ^~~~~~~~~~~
mod_evasive20.c:221:78: error: ‘conn_rec {aka struct conn_rec}’ has no member named ‘remote_ip’; did you mean ‘remote_host’?
                 fprintf(file, "Subject: HTTP BLACKLIST %s\n\n", r->connection->remote_ip);
                                                                              ^~
mod_evasive20.c:222:81: error: ‘conn_rec {aka struct conn_rec}’ has no member named ‘remote_ip’; did you mean ‘remote_host’?
                 fprintf(file, "mod_evasive HTTP Blacklisted %s\n", r->connection->remote_ip);
                                                                                 ^~
mod_evasive20.c:228:81: error: ‘conn_rec {aka struct conn_rec}’ has no member named ‘remote_ip’; did you mean ‘remote_host’?
               snprintf(filename, sizeof(filename), system_command, r->connection->remote_ip);
                                                                                 ^~
mod_evasive20.c:229:15: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
               system(filename);
               ^~~~~~~~~~~~~~~~
apxs:Error: Command failed with rc=65536
@rubensgomes
Copy link

It is 06/13/2022, I am also having the same issue. Any updates?

@QormeSabz
Copy link

Me too

@slowsleep
Copy link

If you use Apache 2.4 complite next command:
sed -i 's/remote_ip/client_ip/g' mod_evasive20.c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants