Package: iptables-netflow-dkms
Version: 2.5-1
Severity: important
Dear Maintainer,
ipt-netflow FTBFS in Linux-5.7:
After commit a7afff31d56db22647251d76d6af030cd47bd97e "scsi: treewide:
Consolidate {get,put}_unaligned_[bl]e24() definitions", build fails due to:
CC [M] /home/ubuntu/ipt-netflow/iptables-netflow/ipt_NETFLOW.o
/home/ubuntu/ipt-netflow/iptables-netflow/ipt_NETFLOW.c:3518:20: error:
conflicting types for ‘put_unaligned_be24’
3518 | static inline void put_unaligned_be24(u32 val, unsigned char *p)
| ^~~~~~~~~~~~~~~~~~
In file included from ./arch/x86/include/asm/unaligned.h:10,
from ./include/linux/etherdevice.h:23,
from ./include/linux/if_vlan.h:11,
from ./include/linux/filter.h:22,
from ./include/net/sock.h:59,
from ./include/net/inet_sock.h:22,
from ./include/linux/udp.h:16,
from
/home/ubuntu/ipt-netflow/iptables-netflow/ipt_NETFLOW.c:32:
./include/linux/unaligned/generic.h:98:20: note: previous definition of
‘put_unaligned_be24’ was here
98 | static inline void put_unaligned_be24(const u32 val, void *p)
Fix it by hiding the local version if Linux >= 5.6 - see attached debdiff.
-- System Information:
Debian Release: bullseye/sid
APT prefers focal-updates
APT policy: (500, 'focal-updates'), (500, 'focal-security'), (500,
'focal-proposed'), (500, 'focal'), (100, 'focal-backports')
Architecture: amd64 (x86_64)
Kernel: Linux 5.4.0-31-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL
set to C.UTF-8), LANGUAGE=en_US:en (charmap=UTF-8) (ignored: LC_ALL set to
C.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages iptables-netflow-dkms depends on:
ii dkms 2.8.1-5ubuntu1
ii libc6 2.31-0ubuntu9
ii libc6-dev 2.31-0ubuntu9
pn libxtables-dev <none>
ii pkg-config 0.29.1-0ubuntu4
Versions of packages iptables-netflow-dkms recommends:
ii iptables 1.8.4-3ubuntu2
Versions of packages iptables-netflow-dkms suggests:
pn irqtop <none>
pn nfdump <none>
diff -Nru iptables-netflow-2.5/debian/changelog
iptables-netflow-2.5/debian/changelog
--- iptables-netflow-2.5/debian/changelog 2020-04-27 06:42:30.000000000
+0000
+++ iptables-netflow-2.5/debian/changelog 2020-05-14 13:26:31.000000000
+0000
@@ -1,3 +1,9 @@
+iptables-netflow (2.5-2) unstable; urgency=medium
+
+ * Fix build with Linux 5.7
+
+ -- Paolo Pisati <[email protected]> Thu, 14 May 2020 13:26:31 +0000
+
iptables-netflow (2.5-1) unstable; urgency=medium
* New upstream release 2.5
diff -Nru
iptables-netflow-2.5/debian/patches/0001-Compatibility-with-kernel-5.7.patch
iptables-netflow-2.5/debian/patches/0001-Compatibility-with-kernel-5.7.patch
---
iptables-netflow-2.5/debian/patches/0001-Compatibility-with-kernel-5.7.patch
1970-01-01 00:00:00.000000000 +0000
+++
iptables-netflow-2.5/debian/patches/0001-Compatibility-with-kernel-5.7.patch
2020-05-14 13:25:49.000000000 +0000
@@ -0,0 +1,59 @@
+From cf9d31d872f13e16f796018009f3d3e4f1f5bc18 Mon Sep 17 00:00:00 2001
+From: Paolo Pisati <[email protected]>
+Date: Thu, 14 May 2020 13:22:56 +0000
+Subject: [PATCH] Compatibility with kernel 5.7
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+After commit a7afff31d56db22647251d76d6af030cd47bd97e "scsi: treewide:
Consolidate
+{get,put}_unaligned_[bl]e24() definitions", build fails due to:
+
+...
+ CC [M] /home/ubuntu/ipt-netflow/iptables-netflow/ipt_NETFLOW.o
+/home/ubuntu/ipt-netflow/iptables-netflow/ipt_NETFLOW.c:3518:20: error:
+conflicting types for ‘put_unaligned_be24’
+ 3518 | static inline void put_unaligned_be24(u32 val, unsigned char *p)
+ | ^~~~~~~~~~~~~~~~~~
+In file included from ./arch/x86/include/asm/unaligned.h:10,
+ from ./include/linux/etherdevice.h:23,
+ from ./include/linux/if_vlan.h:11,
+ from ./include/linux/filter.h:22,
+ from ./include/net/sock.h:59,
+ from ./include/net/inet_sock.h:22,
+ from ./include/linux/udp.h:16,
+ from
+/home/ubuntu/ipt-netflow/iptables-netflow/ipt_NETFLOW.c:32:
+./include/linux/unaligned/generic.h:98:20: note: previous definition of
+‘put_unaligned_be24’ was here
+ 98 | static inline void put_unaligned_be24(const u32 val, void *p)
+...
+
+Fix it by hiding the local version if Linux >= 5.6
+
+Signed-off-by: Paolo Pisati <[email protected]>
+---
+ ipt_NETFLOW.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/ipt_NETFLOW.c b/ipt_NETFLOW.c
+index e6bdeab..a03f667 100644
+--- a/ipt_NETFLOW.c
++++ b/ipt_NETFLOW.c
+@@ -3515,11 +3515,13 @@ static inline __u8 hook2dir(const __u8 hooknum)
+ }
+ #endif
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,7,0)
+ static inline void put_unaligned_be24(u32 val, unsigned char *p)
+ {
+ *p++ = val >> 16;
+ put_unaligned_be16(val, p);
+ }
++#endif
+
+ static struct {
+ s64 ms; /* this much abs milliseconds */
+--
+2.25.1
+
diff -Nru iptables-netflow-2.5/debian/patches/series
iptables-netflow-2.5/debian/patches/series
--- iptables-netflow-2.5/debian/patches/series 2020-04-27 06:42:30.000000000
+0000
+++ iptables-netflow-2.5/debian/patches/series 2020-05-14 13:26:13.000000000
+0000
@@ -2,3 +2,4 @@
add-quoting-needed-by-dh_dkms.patch
properly-pass-CPPFLAGS-and-LDFLAGS.patch
disable-kernel-check.patch
+0001-Compatibility-with-kernel-5.7.patch