-
Notifications
You must be signed in to change notification settings - Fork 0
/
snort.mk.patch
55 lines (55 loc) · 5.73 KB
/
snort.mk.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
--- snort.mk.orig 2022-08-07 15:16:38.628785000 +0200
+++ snort.mk 2022-08-05 20:33:09.325528000 +0200
@@ -1,13 +1,13 @@
ifneq ($(CONFIG_IPV6),y)
snort-configure: libnet daq-configure pcre-configure daq pcre zlib
- cd snort && autoreconf
+ cd snort && autoreconf -fi
export ac_cv_func_malloc_0_nonnull=yes ; \
export have_inaddr_none=yes ; \
export lt_sys_lib_dlsearch_path_spec="$(ARCH)-uclibc" ; \
export lt_sys_lib_search_path_spec="$(ARCH)-uclibc" ; \
- export CFLAGS="$(COPTS) -fcommon $(MIPS16_OPT) -fPIC -DNEED_PRINTF -D_GNU_SOURCE -DHAVE_MALLOC=1 -Drpl_malloc=malloc -I$(TOP)/iptables/include -I$(TOP)/zlib -I$(TOP)/iptables/include/libipq/ -I$(TOP)/libnetfilter_queue/include -I$(TOP)/libnfnetlink/include -I$(TOP)/libnet/include" ; \
- export CPPFLAGS="$(COPTS) -fcommon $(MIPS16_OPT) -fPIC -DNEED_PRINTF -D_GNU_SOURCE -DHAVE_MALLOC=1 -Drpl_malloc=malloc -I$(TOP)/iptables/include -I$(TOP)/zlib -I$(TOP)/iptables/include/libipq/ -I$(TOP)/libnetfilter_queue/include -I$(TOP)/libnfnetlink/include -I$(TOP)/libnet/include" ; \
- export LDFLAGS="-L$(TOP)/iptables/libipq/ -L$(TOP)/libnetfilter_queue/src/.libs $(TOP)/libnetfilter_queue/src/.libs/libnetfilter_queue.a -L$(TOP)/libnet/lib -L$(TOP)/zlib -L$(TOP)/libnfnetlink/src/.libs $(TOP)/libnfnetlink/src/.libs/libnfnetlink.so -L$(TOP)/libdnet/src/.libs -ldnet -lipq -lnet -L$(TOP)/libpcap -lpcap" ;\
+ export CFLAGS="$(COPTS) -fcommon $(MIPS16_OPT) -fPIC -DNEED_PRINTF -D_GNU_SOURCE -DHAVE_MALLOC=1 -Drpl_malloc=malloc -I$(TOP)/iptables/include -I$(TOP)/zlib -I$(TOP)/iptables/include/libipq/ -I$(TOP)/libnetfilter_queue/include -I$(TOP)/libnfnetlink/include -I$(TOP)/libnet/include -I$(TOP)/daq/sfbpf -I$(TOP)/daq/api" ; \
+ export CPPFLAGS="$(COPTS) -fcommon $(MIPS16_OPT) -fPIC -DNEED_PRINTF -D_GNU_SOURCE -DHAVE_MALLOC=1 -Drpl_malloc=malloc -I$(TOP)/iptables/include -I$(TOP)/zlib -I$(TOP)/iptables/include/libipq/ -I$(TOP)/libnetfilter_queue/include -I$(TOP)/libnfnetlink/include -I$(TOP)/libnet/include -I$(TOP)/daq/sfbpf -I$(TOP)/daq/api" ; \
+ export LDFLAGS="-L$(TOP)/daq/sfbpf/.libs -L$(TOP)/daq/os-daq-modules/.libs -L$(TOP)/daq/api/.libs -L$(TOP)/iptables/libipq/ -L$(TOP)/libnetfilter_queue/src/.libs $(TOP)/libnetfilter_queue/src/.libs/libnetfilter_queue.a -L$(TOP)/libnet/lib -L$(TOP)/zlib -L$(TOP)/libnfnetlink/src/.libs $(TOP)/libnfnetlink/src/.libs/libnfnetlink.so -L$(TOP)/libdnet/src/.libs -ldnet -lipq -lnet -L$(TOP)/libpcap -lpcap" ;\
cd snort && ./configure \
--enable-reload \
--enable-ipv6 \
@@ -31,7 +31,7 @@
--with-dnet-includes="$(TOP)/libdnet/include" \
--with-dnet-libraries="$(TOP)/libdnet/src/.libs" \
--with-daq-includes="$(TOP)/daq/install/include" \
- --with-daq-libraries="$(TOP)/daq/install/lib" \
+ --with-daq-libraries="$(TOP)/daq/api/.libs" \
--with-lzma-includes="$(TOP)/xz/src/liblzma/api" \
--with-lzma-libraries="$(TOP)/xz/src/liblzma/.libs" \
PATH=$(TOP)/daq/install/bin:$(PATH)
@@ -47,9 +47,9 @@
export have_inaddr_none=yes ; \
export lt_sys_lib_dlsearch_path_spec="$(ARCH)-uclibc" ; \
export lt_sys_lib_search_path_spec="$(ARCH)-uclibc" ; \
- export CFLAGS="$(COPTS) -fcommon $(MIPS16_OPT) -fPIC -DNEED_PRINTF -D_GNU_SOURCE -DHAVE_MALLOC=1 -Drpl_malloc=malloc -I$(TOP)/iptables-new/include -I$(TOP)/zlib -I$(TOP)/iptables-new/include/libipq/ -I$(TOP)/libnetfilter_queue/include -I$(TOP)/libnfnetlink/include -I$(TOP)/libnet/include" ; \
- export CPPFLAGS="$(COPTS) -fcommon $(MIPS16_OPT) -fPIC -DNEED_PRINTF -D_GNU_SOURCE -DHAVE_MALLOC=1 -Drpl_malloc=malloc -I$(TOP)/iptables-new/include -I$(TOP)/zlib -I$(TOP)/iptables-new/include/libipq/ -I$(TOP)/libnetfilter_queue/include -I$(TOP)/libnfnetlink/include -I$(TOP)/libnet/include" ; \
- export LDFLAGS="-L$(TOP)/iptables-new/libipq/.libs -L$(TOP)/libnetfilter_queue/src/.libs $(TOP)/libnetfilter_queue/src/.libs/libnetfilter_queue.a -L$(TOP)/libnet/lib -L$(TOP)/zlib -L$(TOP)/libnfnetlink/src/.libs $(TOP)/libnfnetlink/src/.libs/libnfnetlink.so -L$(TOP)/libdnet/src/.libs -ldnet -lipq -lnet -L$(TOP)/libpcap -lpcap" ;\
+ export CFLAGS="$(COPTS) -fcommon $(MIPS16_OPT) -fPIC -DNEED_PRINTF -D_GNU_SOURCE -DHAVE_MALLOC=1 -Drpl_malloc=malloc -I$(TOP)/iptables-new/include -I$(TOP)/zlib -I$(TOP)/iptables-new/include/libipq/ -I$(TOP)/libnetfilter_queue/include -I$(TOP)/libnfnetlink/include -I$(TOP)/libnet/include -I$(TOP)/daq/sfbpf -I$(TOP)/daq/api" ; \
+ export CPPFLAGS="$(COPTS) -fcommon $(MIPS16_OPT) -fPIC -DNEED_PRINTF -D_GNU_SOURCE -DHAVE_MALLOC=1 -Drpl_malloc=malloc -I$(TOP)/iptables-new/include -I$(TOP)/zlib -I$(TOP)/iptables-new/include/libipq/ -I$(TOP)/libnetfilter_queue/include -I$(TOP)/libnfnetlink/include -I$(TOP)/libnet/include -I$(TOP)/daq/sfbpf -I$(TOP)/daq/api" ; \
+ export LDFLAGS="-L$(TOP)/daq/sfbpf/.libs -L$(TOP)/daq/os-daq-modules/.libs -L$(TOP)/daq/api/.libs -L$(TOP)/iptables-new/libipq/.libs -L$(TOP)/libnetfilter_queue/src/.libs $(TOP)/libnetfilter_queue/src/.libs/libnetfilter_queue.a -L$(TOP)/libnet/lib -L$(TOP)/zlib -L$(TOP)/libnfnetlink/src/.libs $(TOP)/libnfnetlink/src/.libs/libnfnetlink.so -L$(TOP)/libdnet/src/.libs -ldnet -lipq -lnet -L$(TOP)/libpcap -lpcap" ;\
cd snort && ./configure \
--enable-reload \
--enable-ipv6 \
@@ -73,10 +73,10 @@
--with-dnet-includes="$(TOP)/libdnet/include" \
--with-dnet-libraries="$(TOP)/libdnet/src/.libs" \
--with-daq-includes="$(TOP)/daq/install/include" \
- --with-daq-libraries="$(TOP)/daq/install/lib" \
+ --with-daq-libraries="$(TOP)/daq/api/.libs" \
--with-lzma-includes="$(TOP)/xz/src/liblzma/api" \
--with-lzma-libraries="$(TOP)/xz/src/liblzma/.libs" \
- PATH=$(TOP)/daq/install/bin:$(PATH)
+ PATH=$(TOP)/daq/os-daq-modules:$(PATH)
sed -i 's/\/usr\/include\/pcap/ /g' $(TOP)/snort/src/output-plugins/Makefile
sed -i 's/\/usr\/include\/pcap/ /g' $(TOP)/snort/src/Makefile
sed -i 's/\/usr\/include\/pcap/ /g' $(TOP)/snort/tools/u2boat/Makefile