Not building against nginx/1.11.11
x86_64-pc-linux-gnu-gcc -c -I/usr/include -O2 -pipe -march=ivybridge -mtune=ivybridge -mno-xsaveopt -frecord-gcc-switches -I/usr/include -DNDK_SET_VAR -I/usr/include/apr-1 -I/usr/include/apr-1 -I/usr/include/db6.0 -I/usr/include/apache2 -I/usr/include/libxml2 -DWITH_LUA -DWITH_PCRE_STUDY -DMODSEC_PCRE_MATCH_LIMIT=1500 -DMODSEC_PCRE_MATCH_LIMIT_RECURSION=1500 -DWITH_PCRE_JIT -DREQUEST_EARLY -DWITH_REMOTE_RULES -DWITH_YAJL -I/usr/include/yajl -I src/core -I src/event -I src/event/modules -I src/os/unix -I /var/tmp/portage/www-servers/nginx-1.11.11/work/ngx_devel_kit-0.3.0/objs -I objs/addon/ndk -I /var/tmp/portage/www-servers/nginx-1.11.11/work/lua-nginx-module-0.10.7/src/api -I /var/tmp/portage/www-servers/nginx-1.11.11/work/nginx_upstream_check_module-f3bdb7b85a194e2ad58e3c306$1d021ee76da2f5 -I /var/tmp/portage/www-servers/nginx-1.11.11/work/ngx_metrics-0.1.1/src -I /var/tmp/portage/www-servers$nginx-1.11.11/work/nginx-rtmp-module-1.1.11 -I /var/tmp/portage/www-servers/nginx-1.11.11/work/modsecurity-2.9.1/nginx/$odsecurity -I /var/tmp/portage/www-servers/nginx-1.11.11/work/modsecurity-2.9.1/nginx/modsecurity/../../standalone -I /$ar/tmp/portage/www-servers/nginx-1.11.11/work/modsecurity-2.9.1/nginx/modsecurity/../../apache2 -I /var/tmp/portage/www$servers/nginx-1.11.11/work/nginx-push-stream-module-0.5.2/src -I /var/tmp/portage/www-servers/nginx-1.11.11/work/nginx-$ush-stream-module-0.5.2/include -I /usr/include/libxml2 -I objs -I src/http -I src/http/modules -I src/http/v2 -I src/h$tp/modules/perl -I /var/tmp/portage/www-servers/nginx-1.11.11/work/ngx_devel_kit-0.3.0/src -I /var/tmp/portage/www-serv$rs/nginx-1.11.11/work/ngx_devel_kit-0.3.0/src -I /var/tmp/portage/www-servers/nginx-1.11.11/work/ngx_devel_kit-0.3.0/ob$s -I objs/addon/ndk -I /usr/include -I src/stream \
-o objs/addon/src/ngx_http_memc_module.o \
/var/tmp/portage/www-servers/nginx-1.11.11/work/memc-nginx-module-0.17/src/ngx_http_memc_module.c
/var/tmp/portage/www-servers/nginx-1.11.11/work/modsecurity-2.9.1/nginx/modsecurity/ngx_http_modsecurity.c: In function 'ngx_http_modsecurity_save_request_body':
/var/tmp/portage/www-servers/nginx-1.11.11/work/modsecurity-2.9.1/nginx/modsecurity/ngx_http_modsecurity.c:531:15: erro$: 'ngx_http_connection_t {aka struct <anonymous>}' has no member named 'nfree'
if (hc->nfree && size == cscf->large_client_header_buffers.size) {
^
/var/tmp/portage/www-servers/nginx-1.11.11/work/modsecurity-2.9.1/nginx/modsecurity/ngx_http_modsecurity.c:533:32: erro$: 'ngx_http_connection_t {aka struct <anonymous>}' has no member named 'nfree'
buf = hc->free[--hc->nfree];
^
make[1]: *** [objs/Makefile:2842: objs/addon/modsecurity/ngx_http_modsecurity.o] Error 1
Related to upstream change set http://hg.nginx.org/nginx/rev/e662cbf1b932
Hi @Whissi,
Please use ModSecurity-nginx connector instead of the ModSecurity version 2 for nginx. Here goes the link: https://github.com/SpiderLabs/ModSecurity-nginx
I don't see a release/tagged version for ModSecurity version 2 for nginx yet.
I can confirm the same problem in case of compile nginx 1.11.11+ and ModSecurity 2.9 (master branch https://github.com/SpiderLabs/ModSecurity). Still do not have ModSecurity 3.0 stable to use in together with advised above ModSecurity-nginx connector https://github.com/SpiderLabs/ModSecurity-nginx. So this is not an option. It would be perfect to fix it in stable version.
Hi @Whissi, @ashumal, could you please try the patch from https://github.com/SpiderLabs/ModSecurity/pull/1373?
@defanator: Build was successful with your PR. I didn't try run time tests.
@Whissi, I've been using adapted version of https://github.com/SpiderLabs/ModSecurity-nginx/blob/master/tests/modsecurity-request-body.t for testing this change, and it appears to work fine. The more testers - the better, though.
Thank you, this issue is fixed by your patch, checked on nginx 1.11.12. But I got another unrelated issue #1375