netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Documentation question
@ 2021-07-04 23:45 Duncan Roe
  2021-07-05  8:56 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 9+ messages in thread
From: Duncan Roe @ 2021-07-04 23:45 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: Florian Westphal, Netfilter Development

Hi Pablo,

Did you follow the email thread
https://www.spinics.net/lists/netfilter/msg60278.html?

In summary, OP asked:
> Good morning! I am using the nf-queue.c example from
> libnetfilter_queue repo. In the queue_cb() function, I am trying to
> get the conntrack info but this condition is always false.
>
> if(attr[NFQA_CT])
>
> I can see the flow in conntrack -L output. Anyone know what I am
> missing? Appreciate your help!

and Florian replied:
> IIRC you need to set NFQA_CFG_F_CONNTRACK in NFQA_CFG_FLAGS when setting
> up the queue.  The example only sets F_GSO, so no conntrack info is
> added.

My question is, where should all this have been documented?

`man nfq_set_queue_flags` documents NFQA_CFG_F_CONNTRACK, but
nfq_set_queue_flags() is deprecated and OP was not using it.

The modern approach is to code
> mnl_attr_put_u32(nlh, NFQA_CFG_MASK, htonl(NFQA_CFG_F_GSO));

NFQA_CFG_MASK is supplied by a libnetfilter_queue header, while
mnl_attr_put_u32() is a libmnl function. What to do?

Cheers ... Duncan.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-07-18  5:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-04 23:45 Documentation question Duncan Roe
2021-07-05  8:56 ` Pablo Neira Ayuso
2021-07-05 13:13   ` Duncan Roe
2021-07-05 14:42     ` Pablo Neira Ayuso
2021-07-06  4:27       ` [PATCH libnetfilter_queue] src: examples: Use libnetfilter_queue cached linux headers throughout Duncan Roe
2021-07-06  5:36         ` [PATCH libnetfilter_queue v2] " Duncan Roe
2021-07-06 22:52           ` Pablo Neira Ayuso
2021-07-07  1:58             ` Duncan Roe
2021-07-18  5:27               ` Duncan Roe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).