summaryrefslogtreecommitdiff
path: root/proto_nlmsg.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2017-03-06 12:22:57 +0100
committerTobias Klauser <tklauser@distanz.ch>2017-03-06 12:22:57 +0100
commit88ec2ad37cabb3d3b7ca0e8e5ea3d682c083618d (patch)
tree6c5314165480ca07c8a86e7654dfc5b1342ed814 /proto_nlmsg.c
parenteacba575c3a740e3d02040657f487a30632d8d71 (diff)
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>
Diffstat (limited to 'proto_nlmsg.c')
-rw-r--r--proto_nlmsg.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/proto_nlmsg.c b/proto_nlmsg.c
index f8993e7..f206405 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";
}
}