Re: Сборка 1.21.7 с модулем naxsi

Илья Шипицин chipitsine на gmail.com
Пн Май 30 09:19:06 UTC 2022


теоретически, в рассылке могут найтись люди, ранее сталкивавшиеся с
описанной проблемой....
но лучше написать на Issues · nbs-system/naxsi (github.com)
<https://github.com/nbs-system/naxsi/issues>

пн, 30 мая 2022 г. в 11:17, oradba25 <nginx-forum на forum.nginx.org>:

> Здравствуйте
>
> Linux 3.10.0-1160.66.1.el7.x86_64
>
> Компиляция/сборка самого nginx проходит без проблем
> При попытке компилить сам модуль naxsi выходит ошибка
> 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 -I src/http/v2 -I src/mail -I src/stream \
>         -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:37:27: ошибка: field «pkt6» has incomplete type
>      struct in6_pktinfo    pkt6;
>                            ^
> make[1]: *** [objs/addon/naxsi_src/naxsi_runtime.o] Ошибка 1
>
> Поиском попадалось, что это возможно из-за более раннего включения
> системных
> заголовков, чем заголовки nginx
> Но тут вроде все безопасно
>
> В самом naxsi.h
> #include "ext/libinjection/libinjection_sqli.h"
> #include "ext/libinjection/libinjection_xss.h"
> #include <ctype.h>
> #include <nginx.h>
> #include <ngx_config.h>
> #include <ngx_core.h>
> #include <ngx_event.h>           <--- Вот тут и ломается
> #include <ngx_http.h>
> #include <ngx_http_core_module.h>
> #include <ngx_md5.h>
> #include <pcre.h>
>
> В двух первых подключается только string.h
>
> Лечится комментированием в ngx_event_udp.h
> #if (NGX_HAVE_INET6 && NGX_HAVE_IPV6_RECVPKTINFO)
> /*    struct in6_pktinfo    pkt6;*/
> #endif
>
> IPv6 у нас не ходит, и возможно, это пролезет
> Но как-то корявенько
>
> Может подскажете, как решить более штатными средствами
>
> Posted at Nginx Forum:
> https://forum.nginx.org/read.php?21,294312,294312#msg-294312
>
> _______________________________________________
> nginx-ru mailing list -- nginx-ru на nginx.org
> To unsubscribe send an email to nginx-ru-leave на nginx.org
>
----------- следующая часть -----------
Вложение в формате HTML было извлечено…
URL: <http://mailman.nginx.org/pipermail/nginx-ru/attachments/20220530/a0868646/attachment.htm>


Подробная информация о списке рассылки nginx-ru