Hi, when I try compile nginx 1.23.0 with naxsi (1.3) I get errors
[lubomudr@nginx-1 nginx-1.23.0]$ ./configure --add-dynamic-module=../naxsi/naxsi_src
...
[lubomudr@nginx-1 nginx-1.23.0]$ make
...
cc -c -fPIC -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
-o objs/addon/naxsi_src/naxsi_runtime.o \
../naxsi/naxsi_src/naxsi_runtime.c
In file included from src/event/ngx_event.h:526:0,
from ../naxsi/naxsi_src/naxsi.h:18,
from ../naxsi/naxsi_src/naxsi_runtime.c:8:
src/event/ngx_event_udp.h:38:27: error: field ‘pkt6’ has incomplete type
struct in6_pktinfo pkt6;
^
../naxsi/naxsi_src/naxsi_runtime.c: In function ‘ngx_http_naxsi_data_parse’:
../naxsi/naxsi_src/naxsi_runtime.c:2924:36: error: request for member ‘nelts’ in something not a structure or union
if (r->headers_in.x_forwarded_for.nelts >= 1) {
^
../naxsi/naxsi_src/naxsi_runtime.c:2925:7: error: incompatible types when assigning to type ‘ngx_array_t’ from type ‘struct ngx_table_elt_t *’
a = r->headers_in.x_forwarded_for;
^
../naxsi/naxsi_src/naxsi_runtime.c: In function ‘ngx_http_naxsi_update_current_ctx_status’:
../naxsi/naxsi_src/naxsi_runtime.c:2963:38: error: request for member ‘nelts’ in something not a structure or union
if (r->headers_in.x_forwarded_for.nelts >= 1) {
^
../naxsi/naxsi_src/naxsi_runtime.c:2964:9: error: incompatible types when assigning to type ‘ngx_array_t’ from type ‘struct ngx_table_elt_t *’
a = r->headers_in.x_forwarded_for;
^
make[1]: *** [objs/addon/naxsi_src/naxsi_runtime.o] Error 1
make[1]: Leaving directory `/home/lubomudr/nginx-1.23.0'
make: *** [build] Error 2
CentOS 7.9
For two reasons:
Development Guide requires "The following two #include statements must appear at the beginning of every nginx file"
CHANGES say: "Change in internal API: now header lines are represented as linked lists.". Specifically, the structure ngx_http_headers_in_t has changed, x_forwarded_for is now of type ngx_table_elt_t*
Hi, when I try compile nginx 1.23.0 with naxsi (1.3) I get errors
CentOS 7.9
For two reasons:
Patches to fix:
Please excuse me if it's wrong This is my first post