Welcome! Log In Create A New Profile

Advanced

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

May 30, 2022 02:17AM
Здравствуйте

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 у нас не ходит, и возможно, это пролезет
Но как-то корявенько

Может подскажете, как решить более штатными средствами
Subject Author Posted

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

oradba25 May 30, 2022 02:17AM

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

Илья Шипицин May 30, 2022 05:20AM

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

Sergey Kandaurov May 30, 2022 06:26AM

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

oradba25 May 30, 2022 07:02PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 172
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready