netsniff-ng: bump to version 0.6.3
authorBaruch Siach <baruch@tkos.co.il>
Wed, 19 Apr 2017 18:31:47 +0000 (21:31 +0300)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 20 Apr 2017 21:30:09 +0000 (23:30 +0200)
Drop upstream patch.

Add two more patches to deal with musl build issues.

Cc: Joris Lijssens <joris.lijssens@gmail.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/netsniff-ng/0001-flowtop-take-PKG_CONFIG-into-account-for-libnetfilte.patch [new file with mode: 0644]
package/netsniff-ng/0001-netsniff-ng-nlmsg-Drop-dissection-of-GENL_ID_GENERAT.patch [deleted file]
package/netsniff-ng/0002-flowtop-take-PKG_CONFIG-into-account-for-libnetfilte.patch [deleted file]
package/netsniff-ng/0002-proc.h-add-missing-headers.patch [new file with mode: 0644]
package/netsniff-ng/0003-pcap_io.h-fix-if_arp.h-musl-libc-kernel-headers-conf.patch [new file with mode: 0644]
package/netsniff-ng/netsniff-ng.hash
package/netsniff-ng/netsniff-ng.mk

diff --git a/package/netsniff-ng/0001-flowtop-take-PKG_CONFIG-into-account-for-libnetfilte.patch b/package/netsniff-ng/0001-flowtop-take-PKG_CONFIG-into-account-for-libnetfilte.patch
new file mode 100644 (file)
index 0000000..bd7619b
--- /dev/null
@@ -0,0 +1,43 @@
+From 2d38d16d86db941fcb4d4fb8ad761e7e163c01e5 Mon Sep 17 00:00:00 2001
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Sun, 16 Apr 2017 07:41:38 +0300
+Subject: [PATCH] flowtop: take PKG_CONFIG into account for
+ libnetfilter_conntrack
+
+Use $PKG_CONFIG to determine the linker flags for libnetfilter_conntrack. This
+fixes static link failure like the following:
+
+  LD   flowtop
+.../usr/x86_64-buildroot-linux-musl/sysroot/usr/lib/../lib64/libnetfilter_conntrack.a(main.o): In function `nfct_open_nfnl':
+main.c:(.text+0x52): undefined reference to `nfnl_subsys_open'
+main.c:(.text+0x69): undefined reference to `nfnl_subsys_close'
+main.c:(.text+0x87): undefined reference to `nfnl_subsys_open'
+main.c:(.text+0xa3): undefined reference to `nfnl_subsys_close'
+.../usr/x86_64-buildroot-linux-musl/sysroot/usr/lib/../lib64/libnetfilter_conntrack.a(main.o): In function `nfct_open':
+main.c:(.text+0xc9): undefined reference to `nfnl_open'
+main.c:(.text+0xf0): undefined reference to `nfnl_close'
+...
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+---
+
+Patch status: sent upstream
+http://www.mail-archive.com/netsniff-ng%40googlegroups.com/msg01971.html
+
+ flowtop/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/flowtop/Makefile b/flowtop/Makefile
+index effe7eb33fc3..e001ce8aaf13 100644
+--- a/flowtop/Makefile
++++ b/flowtop/Makefile
+@@ -1,5 +1,5 @@
+ flowtop-libs =        -lurcu \
+-              -lnetfilter_conntrack \
++              $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs libnetfilter_conntrack 2> /dev/null ) \
+               $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs ncurses 2> /dev/null \
+                       || echo '-lncurses') \
+               $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs tinfo 2> /dev/null ) \
+-- 
+2.11.0
+
diff --git a/package/netsniff-ng/0001-netsniff-ng-nlmsg-Drop-dissection-of-GENL_ID_GENERAT.patch b/package/netsniff-ng/0001-netsniff-ng-nlmsg-Drop-dissection-of-GENL_ID_GENERAT.patch
deleted file mode 100644 (file)
index 4ccf9d6..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-From 88ec2ad37cabb3d3b7ca0e8e5ea3d682c083618d Mon Sep 17 00:00:00 2001
-From: Tobias Klauser <tklauser@distanz.ch>
-Date: Mon, 6 Mar 2017 12:22:57 +0100
-Subject: [PATCH] netsniff-ng: nlmsg: Drop dissection of GENL_ID_GENERATE type
-
-After kernel commit a07ea4d9941a ("genetlink: no longer support using
-static family IDs"), GENL_ID_GENERATE is no longer exposed to userspace
-(and actually should never have been). Change the genl nlmsg dissector
-to only consider the nlctrl family and the two other static family IDs
-needed for workarounds. All other family IDs are considered dynamically
-generated.
-
-Fixes #171
-Reported-by: Jaroslav Škarvada <jskarvad@redhat.com>
-Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-Signed-off-by: Baruch Siach <baruch@tkos.co.il>
----
-Patch status: upstream commit 88ec2ad37cabb
-
- proto_nlmsg.c | 12 +++++++++---
- 1 file changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/proto_nlmsg.c b/proto_nlmsg.c
-index f8993e794a54..f2064059be08 100644
---- a/proto_nlmsg.c
-+++ b/proto_nlmsg.c
-@@ -242,9 +242,15 @@ static const char *nlmsg_rtnl_type2str(uint16_t type)
- static const char *nlmsg_genl_type2str(uint16_t type)
- {
-       switch (type) {
--      case GENL_ID_GENERATE:  return "id gen";
--      case GENL_ID_CTRL:      return "id ctrl";
--      default:                return NULL;
-+      case GENL_ID_CTRL:      return "nlctrl";
-+#if defined(GENL_ID_PCMRAID)
-+      case GENL_ID_PCMRAID:   return "pcmraid";
-+#endif
-+#if defined(GENL_ID_VFS_DQUOT)
-+      case GENL_ID_VFS_DQUOT: return "vfs dquot";
-+#endif
-+      /* only dynamic family IDs should be used starting with Linux 4.10 */
-+      default:                return "dynamic";
-       }
- }
--- 
-2.11.0
-
diff --git a/package/netsniff-ng/0002-flowtop-take-PKG_CONFIG-into-account-for-libnetfilte.patch b/package/netsniff-ng/0002-flowtop-take-PKG_CONFIG-into-account-for-libnetfilte.patch
deleted file mode 100644 (file)
index bd7619b..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-From 2d38d16d86db941fcb4d4fb8ad761e7e163c01e5 Mon Sep 17 00:00:00 2001
-From: Baruch Siach <baruch@tkos.co.il>
-Date: Sun, 16 Apr 2017 07:41:38 +0300
-Subject: [PATCH] flowtop: take PKG_CONFIG into account for
- libnetfilter_conntrack
-
-Use $PKG_CONFIG to determine the linker flags for libnetfilter_conntrack. This
-fixes static link failure like the following:
-
-  LD   flowtop
-.../usr/x86_64-buildroot-linux-musl/sysroot/usr/lib/../lib64/libnetfilter_conntrack.a(main.o): In function `nfct_open_nfnl':
-main.c:(.text+0x52): undefined reference to `nfnl_subsys_open'
-main.c:(.text+0x69): undefined reference to `nfnl_subsys_close'
-main.c:(.text+0x87): undefined reference to `nfnl_subsys_open'
-main.c:(.text+0xa3): undefined reference to `nfnl_subsys_close'
-.../usr/x86_64-buildroot-linux-musl/sysroot/usr/lib/../lib64/libnetfilter_conntrack.a(main.o): In function `nfct_open':
-main.c:(.text+0xc9): undefined reference to `nfnl_open'
-main.c:(.text+0xf0): undefined reference to `nfnl_close'
-...
-
-Signed-off-by: Baruch Siach <baruch@tkos.co.il>
----
-
-Patch status: sent upstream
-http://www.mail-archive.com/netsniff-ng%40googlegroups.com/msg01971.html
-
- flowtop/Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/flowtop/Makefile b/flowtop/Makefile
-index effe7eb33fc3..e001ce8aaf13 100644
---- a/flowtop/Makefile
-+++ b/flowtop/Makefile
-@@ -1,5 +1,5 @@
- flowtop-libs =        -lurcu \
--              -lnetfilter_conntrack \
-+              $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs libnetfilter_conntrack 2> /dev/null ) \
-               $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs ncurses 2> /dev/null \
-                       || echo '-lncurses') \
-               $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs tinfo 2> /dev/null ) \
--- 
-2.11.0
-
diff --git a/package/netsniff-ng/0002-proc.h-add-missing-headers.patch b/package/netsniff-ng/0002-proc.h-add-missing-headers.patch
new file mode 100644 (file)
index 0000000..6968445
--- /dev/null
@@ -0,0 +1,44 @@
+From 28773ac06d0e0f00d6a56973eacae4f5df9e8cc2 Mon Sep 17 00:00:00 2001
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Sun, 16 Apr 2017 08:11:20 +0300
+Subject: [PATCH] proc.h: add missing headers
+
+ino_t and pid_t require stat.h and types.h, respectively. Fixes the following
+build failure with musl libc:
+
+In file included from cpp.c:7:0:
+proc.h:11:31: error: unknown type name ‘ino_t’
+ extern int proc_find_by_inode(ino_t ino, char *cmdline, size_t len, pid_t *pid);
+                               ^
+proc.h:11:69: error: unknown type name ‘pid_t’
+ extern int proc_find_by_inode(ino_t ino, char *cmdline, size_t len, pid_t *pid);
+                                                                     ^
+proc.h:12:25: error: unknown type name ‘pid_t’
+ extern bool proc_exists(pid_t pid);
+                         ^
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+---
+
+Patch status: sent upstream
+http://www.mail-archive.com/netsniff-ng%40googlegroups.com/msg01972.html
+
+ proc.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/proc.h b/proc.h
+index 4c34a6412a81..2ce0c6e7a932 100644
+--- a/proc.h
++++ b/proc.h
+@@ -2,6 +2,8 @@
+ #define PROC_H
+ #include <stdbool.h>
++#include <sys/stat.h>
++#include <sys/types.h>
+ extern void cpu_affinity(int cpu);
+ extern int set_proc_prio(int prio);
+-- 
+2.11.0
+
diff --git a/package/netsniff-ng/0003-pcap_io.h-fix-if_arp.h-musl-libc-kernel-headers-conf.patch b/package/netsniff-ng/0003-pcap_io.h-fix-if_arp.h-musl-libc-kernel-headers-conf.patch
new file mode 100644 (file)
index 0000000..23b0284
--- /dev/null
@@ -0,0 +1,62 @@
+From f937049ea82ac74635861b3a780d1372f681cc6b Mon Sep 17 00:00:00 2001
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Sun, 16 Apr 2017 08:18:10 +0300
+Subject: [PATCH] pcap_io.h: fix if_arp.h musl libc/kernel headers conflict
+
+Use libc provided arp definitions to avoid build failure with musl libc:
+
+In file included from pcap_io.h:19:0,
+                 from trafgen.c:59:
+.../usr/x86_64-buildroot-linux-musl/sysroot/usr/include/linux/if_arp.h:113:8: error: redefinition of ‘struct arpreq’
+ struct arpreq {
+        ^
+In file included from .../usr/x86_64-buildroot-linux-musl/sysroot/usr/include/netinet/if_ether.h:111:0,
+                 from .../usr/x86_64-buildroot-linux-musl/sysroot/usr/include/net/ethernet.h:10,
+                 from trafgen.c:23:
+.../usr/x86_64-buildroot-linux-musl/sysroot/usr/include/net/if_arp.h:99:8: note: originally defined here
+ struct arpreq {
+        ^
+
+Add a local definition of the ARPHRD_CAN macro that glibc does not provide.
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+---
+
+Patch status: sent upstream
+http://www.mail-archive.com/netsniff-ng%40googlegroups.com/msg01974.html
+
+ built_in.h | 4 ++++
+ pcap_io.h  | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/built_in.h b/built_in.h
+index d10579abd689..fa8af60d6029 100644
+--- a/built_in.h
++++ b/built_in.h
+@@ -382,6 +382,10 @@ static inline u64 cpu_to_le64(u64 val)
+ # define PACKET_QDISC_BYPASS 20
+ #endif
++#ifndef ARPHRD_CAN
++# define ARPHRD_CAN                   280
++#endif
++
+ #ifndef ARPHRD_IEEE802154_MONITOR
+ # define ARPHRD_IEEE802154_MONITOR    805
+ #endif
+diff --git a/pcap_io.h b/pcap_io.h
+index 3d70b217ada6..088858e89ccd 100644
+--- a/pcap_io.h
++++ b/pcap_io.h
+@@ -16,7 +16,7 @@
+ #include <sys/socket.h>
+ #include <linux/if.h>
+ #include <linux/if_packet.h>
+-#include <linux/if_arp.h>
++#include <net/if_arp.h>
+ #include "built_in.h"
+ #include "die.h"
+-- 
+2.11.0
+
index 79dc686174d7841e329d5e82895b08d0b0247dd6..fea2dada1463129c7c65fbd4168ab59e1933c3df 100644 (file)
@@ -1,2 +1,2 @@
 # Locally calculated after checking signature
-sha256 4f2f7afc96b5044b5ccd3b671d0c3b8cb166bfa7f1063cea6c2d5e0fd5a13cf5 netsniff-ng-0.6.2.tar.xz
+sha256 f8e0094f77de8a70f91240bfa77137d5631ac48138cb29fcf962c0bcbe81f04a netsniff-ng-0.6.3.tar.xz
index 5d5974731d00e89d2ef20edbd9fbbb08961c834c..73c840cf0fa1e99316e2ab1acff73fc27ba44340 100644 (file)
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-NETSNIFF_NG_VERSION = 0.6.2
+NETSNIFF_NG_VERSION = 0.6.3
 NETSNIFF_NG_SITE = http://pub.netsniff-ng.org/netsniff-ng
 NETSNIFF_NG_SOURCE = netsniff-ng-$(NETSNIFF_NG_VERSION).tar.xz
 NETSNIFF_NG_LICENSE = GPL-2.0