python-pathvalidate: bump version to 0.14.1
[buildroot-gz.git] / package / netsniff-ng / 0001-netsniff-ng-nlmsg-Drop-dissection-of-GENL_ID_GENERAT.patch
blob4ccf9d643c160a27b551646ef458e5b6f44349bb
1 From 88ec2ad37cabb3d3b7ca0e8e5ea3d682c083618d Mon Sep 17 00:00:00 2001
2 From: Tobias Klauser <tklauser@distanz.ch>
3 Date: Mon, 6 Mar 2017 12:22:57 +0100
4 Subject: [PATCH] netsniff-ng: nlmsg: Drop dissection of GENL_ID_GENERATE type
6 After kernel commit a07ea4d9941a ("genetlink: no longer support using
7 static family IDs"), GENL_ID_GENERATE is no longer exposed to userspace
8 (and actually should never have been). Change the genl nlmsg dissector
9 to only consider the nlctrl family and the two other static family IDs
10 needed for workarounds. All other family IDs are considered dynamically
11 generated.
13 Fixes #171
14 Reported-by: Jaroslav Škarvada <jskarvad@redhat.com>
15 Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
16 Signed-off-by: Baruch Siach <baruch@tkos.co.il>
17 ---
18 Patch status: upstream commit 88ec2ad37cabb
20 proto_nlmsg.c | 12 +++++++++---
21 1 file changed, 9 insertions(+), 3 deletions(-)
23 diff --git a/proto_nlmsg.c b/proto_nlmsg.c
24 index f8993e794a54..f2064059be08 100644
25 --- a/proto_nlmsg.c
26 +++ b/proto_nlmsg.c
27 @@ -242,9 +242,15 @@ static const char *nlmsg_rtnl_type2str(uint16_t type)
28 static const char *nlmsg_genl_type2str(uint16_t type)
30 switch (type) {
31 - case GENL_ID_GENERATE: return "id gen";
32 - case GENL_ID_CTRL: return "id ctrl";
33 - default: return NULL;
34 + case GENL_ID_CTRL: return "nlctrl";
35 +#if defined(GENL_ID_PCMRAID)
36 + case GENL_ID_PCMRAID: return "pcmraid";
37 +#endif
38 +#if defined(GENL_ID_VFS_DQUOT)
39 + case GENL_ID_VFS_DQUOT: return "vfs dquot";
40 +#endif
41 + /* only dynamic family IDs should be used starting with Linux 4.10 */
42 + default: return "dynamic";
46 --
47 2.11.0