aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2015-04-28 22:14:55 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2015-04-28 22:16:35 +0200
commitcc3af093a5ecaca15f519f414f335666b63f84cc (patch)
treebc305bccb8fcd7aa2179f12de00cf0abe2ca9d66
parent7261dfc1873e651f4dcb0aabd3e61130d02183bd (diff)
downloadaports-cc3af093a5ecaca15f519f414f335666b63f84cc.tar.bz2
aports-cc3af093a5ecaca15f519f414f335666b63f84cc.tar.xz
main/ulogd: fix build with newer kernel headers
-rw-r--r--main/ulogd/30e24dbfc7a8644e29664070e8c16e5c3997f87e.patch100
-rw-r--r--main/ulogd/APKBUILD16
2 files changed, 111 insertions, 5 deletions
diff --git a/main/ulogd/30e24dbfc7a8644e29664070e8c16e5c3997f87e.patch b/main/ulogd/30e24dbfc7a8644e29664070e8c16e5c3997f87e.patch
new file mode 100644
index 0000000000..c00dcd6578
--- /dev/null
+++ b/main/ulogd/30e24dbfc7a8644e29664070e8c16e5c3997f87e.patch
@@ -0,0 +1,100 @@
+From 30e24dbfc7a8644e29664070e8c16e5c3997f87e Mon Sep 17 00:00:00 2001
+From: Pablo Neira Ayuso <pablo@netfilter.org>
+Date: Fri, 7 Nov 2014 18:33:01 +0100
+Subject: include: keep a copy of linux/netfilter_ipv4/ipt_ULOG.h
+
+This fixes compilation if you use a Linux kernel >= 3.17. This problem
+occurs since ULOG was removed from mainstream:
+
+http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7200135bc1e61f1437dc326ae2ef2f310c50b4eb
+
+Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=986
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+
+diff --git a/configure.ac b/configure.ac
+index 522c345..c5f573c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -142,7 +142,7 @@ dnl AM_CONDITIONAL(HAVE_PGSQL, test x$pgsqldir != x)
+
+ AC_CONFIG_FILES(include/Makefile include/ulogd/Makefile include/libipulog/Makefile \
+ include/linux/Makefile include/linux/netfilter/Makefile \
+- libipulog/Makefile \
++ include/linux/netfilter_ipv4/Makefile libipulog/Makefile \
+ input/Makefile input/packet/Makefile input/flow/Makefile \
+ input/sum/Makefile \
+ filter/Makefile filter/raw2packet/Makefile filter/packet2flow/Makefile \
+diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am
+index ca80d0d..18af1c2 100644
+--- a/include/linux/Makefile.am
++++ b/include/linux/Makefile.am
+@@ -1,2 +1,2 @@
+-
+-SUBDIRS = netfilter
++SUBDIRS = netfilter \
++ netfilter_ipv4
+diff --git a/include/linux/netfilter_ipv4/Makefile.am b/include/linux/netfilter_ipv4/Makefile.am
+new file mode 100644
+index 0000000..41819a3
+--- /dev/null
++++ b/include/linux/netfilter_ipv4/Makefile.am
+@@ -0,0 +1 @@
++noinst_HEADERS = ipt_ULOG.h
+diff --git a/include/linux/netfilter_ipv4/ipt_ULOG.h b/include/linux/netfilter_ipv4/ipt_ULOG.h
+new file mode 100644
+index 0000000..417aad2
+--- /dev/null
++++ b/include/linux/netfilter_ipv4/ipt_ULOG.h
+@@ -0,0 +1,49 @@
++/* Header file for IP tables userspace logging, Version 1.8
++ *
++ * (C) 2000-2002 by Harald Welte <laforge@gnumonks.org>
++ *
++ * Distributed under the terms of GNU GPL */
++
++#ifndef _IPT_ULOG_H
++#define _IPT_ULOG_H
++
++#ifndef NETLINK_NFLOG
++#define NETLINK_NFLOG 5
++#endif
++
++#define ULOG_DEFAULT_NLGROUP 1
++#define ULOG_DEFAULT_QTHRESHOLD 1
++
++#define ULOG_MAC_LEN 80
++#define ULOG_PREFIX_LEN 32
++
++#define ULOG_MAX_QLEN 50
++/* Why 50? Well... there is a limit imposed by the slab cache 131000
++ * bytes. So the multipart netlink-message has to be < 131000 bytes.
++ * Assuming a standard ethernet-mtu of 1500, we could define this up
++ * to 80... but even 50 seems to be big enough. */
++
++/* private data structure for each rule with a ULOG target */
++struct ipt_ulog_info {
++ unsigned int nl_group;
++ size_t copy_range;
++ size_t qthreshold;
++ char prefix[ULOG_PREFIX_LEN];
++};
++
++/* Format of the ULOG packets passed through netlink */
++typedef struct ulog_packet_msg {
++ unsigned long mark;
++ long timestamp_sec;
++ long timestamp_usec;
++ unsigned int hook;
++ char indev_name[IFNAMSIZ];
++ char outdev_name[IFNAMSIZ];
++ size_t data_len;
++ char prefix[ULOG_PREFIX_LEN];
++ unsigned char mac_len;
++ unsigned char mac[ULOG_MAC_LEN];
++ unsigned char payload[0];
++} ulog_packet_msg_t;
++
++#endif /*_IPT_ULOG_H*/
+--
+cgit v0.10.2
+
diff --git a/main/ulogd/APKBUILD b/main/ulogd/APKBUILD
index c2b51f955c..fc3a9b233d 100644
--- a/main/ulogd/APKBUILD
+++ b/main/ulogd/APKBUILD
@@ -10,13 +10,15 @@ license="GPL2"
depends=""
makedepends="libmnl-dev libpcap-dev libnetfilter_acct-dev
libnfnetlink-dev libnetfilter_conntrack-dev libnetfilter_log-dev
- pkgconfig mariadb-dev openssl-dev postgresql-dev zlib-dev linux-headers"
+ pkgconfig mariadb-dev openssl-dev postgresql-dev zlib-dev linux-headers
+ autoconf automake libtool"
subpackages="$pkgname-mysql $pkgname-pgsql $pkgname-doc"
source="http://www.netfilter.org/projects/$pkgname/files/$pkgname-$pkgver.tar.bz2
musl-fixes.patch
ulogd.initd
ulogd.confd
- ulogd.logrotate"
+ ulogd.logrotate
+ 30e24dbfc7a8644e29664070e8c16e5c3997f87e.patch"
_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
@@ -32,6 +34,7 @@ prepare() {
build() {
cd "$_builddir"
export CFLAGS="$CFLAGS -D_GNU_SOURCE"
+ autoreconf -vif
./configure \
--build=$CBUILD \
--host=$CHOST \
@@ -79,14 +82,17 @@ md5sums="7c71ec460dfea5287eba27472c521ebc ulogd-2.0.4.tar.bz2
5f83766c1255bf75ab65d43bfb320820 musl-fixes.patch
c865bb587b50b3916a8488d521e708a5 ulogd.initd
b9b2fa217ee02211debee5a5dffdcda7 ulogd.confd
-77688e9c300750f5423ed2ad37ae8b32 ulogd.logrotate"
+77688e9c300750f5423ed2ad37ae8b32 ulogd.logrotate
+f8668a87f4367ea04bd772229cb98f69 30e24dbfc7a8644e29664070e8c16e5c3997f87e.patch"
sha256sums="56b30a13a8832e97178f39b7bb173a0b1dfe173dbb60d99a1a386c0962a2effd ulogd-2.0.4.tar.bz2
a5e1f9bf792227e657fc8af619af6e736712bb5b1e81faa16ea55c447482d547 musl-fixes.patch
4cce30493a9c2b44623be25ae0711bf120e710acbdcc5d03227f3de76002d53e ulogd.initd
78cfce3aceba3f29e08f37b2f29784aedde1266d3b7dfdbe2426d2ed258e9c18 ulogd.confd
-1acb7dad5182a9b9f9df88ef15ca31076fdba3ba6a63a5faad0edc96e3204ca9 ulogd.logrotate"
+1acb7dad5182a9b9f9df88ef15ca31076fdba3ba6a63a5faad0edc96e3204ca9 ulogd.logrotate
+98eeb183d610986d588eb15a22cd5791c27d053ba059a5bf1403f0c4aac167d0 30e24dbfc7a8644e29664070e8c16e5c3997f87e.patch"
sha512sums="08e88661fcfbcfd327b03b7a883dc239991f47d5a4e4561f3ada5f6acc8f2349f3bd38c1c67f28e42bbccf4cad63b2b7c3b732c23bf24b7c5f05320d27977773 ulogd-2.0.4.tar.bz2
e512b1e1e6f00cc8d0c4e3eee7c87ba854d668e40d77e82aabfacdc79425b2101f8ec77f8f4fdf19b6f95e2a4595fd5d53560647cad45ab498a359cec92f57fd musl-fixes.patch
1ebd86196fac853c985bc6d73a71f0a982ba8656a0342f49eff0a285ec605f7a3f523347993c69ab9e57a484e9e7193b2083d173261f87de1d5087d8d27804bb ulogd.initd
bdae1ff90c671b6847dfda1947a33e24bfbe16ad963f85769d923ba33021bc4ca315fd410b46fac102f0a24e879e4be4ad7bb5978c5a6755e74e6b5d7c3e18ee ulogd.confd
-2ded9734ca903147ae2fc15af47d3f03ecc44f1f9b284d3c30d013a762d0cebf22e14ed3f5e7be8ee2d3d508c7b7afcdbc3819d4930c264416ed1fa463e03e6d ulogd.logrotate"
+2ded9734ca903147ae2fc15af47d3f03ecc44f1f9b284d3c30d013a762d0cebf22e14ed3f5e7be8ee2d3d508c7b7afcdbc3819d4930c264416ed1fa463e03e6d ulogd.logrotate
+0b47b08c9d791f0decd3a4f19296877818e9d955eb0362ab774a372a5dc38f89e91e02b1a234c5973de5dab8f4b2c10f3a50891547fa1a662e75d6f020804a5d 30e24dbfc7a8644e29664070e8c16e5c3997f87e.patch"