Skip to content

monitor: Support printing processes which caused the event

Phil Sutter netfilter-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2include: Add proc_info symbols to nf_tables.hinclude/linux/netfilter/nf_tables.h+15 -00 replies
2/2monitor: Support printing processes which caused the eventinclude/nftables.h src/main.c src/netlink.c +1 more+83 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [nft PATCH 0/2] monitor: Support printing processes which caused the event

This is a hopefully correct implementation of what I wanted to achieve in the same named RFC sent before: Instead of relying on the netlink msgid to be equal to the sender's PID, make use of the kernel infrastructure added in a previous patch.

Note that this implementation does not use libnftnl like other parts of the code. I skipped that because handling of NFT_MSG_PROC_INFO type messages is unidirectional only and they contain just two attributes - the amount of code to add to libnftnl to parse them there seemed not feasible just to follow coding-style.

The first patch is probably redundant since it's changes will be imported by a generic kernel header update anyway, but it allows for quickly testing the implementation so left here for reference.

Phil Sutter (2):
include: Add proc_info symbols to nf_tables.h
monitor: Support printing processes which caused the event

 include/linux/netfilter/nf_tables.h | 15 ++++++++
 include/nftables.h                  |  1 +
 src/main.c                          | 12 +++++-
 src/netlink.c                       | 76 ++++++++++++++++++++++++++++++++++---
 src/rule.c                          |  2 -
 5 files changed, 98 insertions(+), 8 deletions(-)
Signature · 1 line
2.11.0