Skip to content

src: Add nfq_nlmsg_put2() - user specifies header flags

Duncan Roe netfilter-devel 4 versions – Applied

Status from this message: Applied, thanks

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest1 patch 1 replyApplied
  2. v41 patch 1 replySuperseded
  3. v31 patch 7 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v21 patch3 repliesSuperseded

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/1src: Add nfq_nlmsg_put2() - user specifies header flagsinclude/libnetfilter_queue/libnetfilter_queue.h src/nlmsg.c+57 -11 reply

Reviews trailers per patch

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

Read the v5 thread

Cover letter [PATCH libnetfilter_queue v5 0/1] src: Add nfq_nlmsg_put2() - user specifies header flags

Hi Pablo,

This is as you requested, except as below and the sample prints the message

Quoted 1 line

"This kernel version does not allow to retrieve security context.\n"

(i.e. same as what utils/nfqnl_test.c does) instead of exit(EXIT_FAILURE) as you suggested.
Looking at an 80cc man page, I think NLM_F_xxx looks better than NLM_F_*. Also the code sample wrapped on the nfq_nlmsg_put2() line, so split it. The code sample mixed nlrxbuf and nltxbuf. Now all just buf.

Quoted 1 line · Pablo Neira Ayuso

On Mon, Nov 20, 2023 at 12:08:49PM +1100, Duncan Roe wrote:

[...]

Quoted 9 lines

Review

Quoted 6 lines
(quoted diff) +6 -0
+
+/**
+ * nfq_nlmsg_put2 - Set up a netlink header with user-specified flags
+ *                  in a memory buffer
+ * \param *buf Pointer to memory buffer
+ * \param type Either NFQNL_MSG_CONFIG or NFQNL_MSG_VERDICT

This can be any value in enum nfqnl_msg_types.

I think not. NFQNL_MSG_PACKET is from kernel to userspace. Have added NFQNL_MSG_VERDICT_BATCH to complete the list of allowed values.

Cheers ... Duncan.

Duncan Roe (1):
src: Add nfq_nlmsg_put2() - user specifies header flags

 .../libnetfilter_queue/libnetfilter_queue.h   |  1 +
 src/nlmsg.c                                   | 57 ++++++++++++++++++-
 2 files changed, 57 insertions(+), 1 deletion(-)
Signature · 1 line
2.35.8