netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Documentation question
@ 2019-10-30  9:07 Duncan Roe
  2019-10-30  9:15 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 15+ messages in thread
From: Duncan Roe @ 2019-10-30  9:07 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: Netfilter Development

Hi Pablo,

When setting verdicts, does sending amended packet contents imply to accept the
packet? In my app I have assumed not and that seems to work fine, but I'd like
to be sure for the doco.

Cheers ... Duncan.

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Documentation question
@ 2019-11-20 23:09 Duncan Roe
  2019-11-20 23:26 ` Florian Westphal
  0 siblings, 1 reply; 15+ messages in thread
From: Duncan Roe @ 2019-11-20 23:09 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: Netfilter Development

Hi Pablo,

Deprecated nfq_set_queue_flags documents flag NFQA_CFG_F_FAIL_OPEN for kernel to
accept packets if the kernel queue gets full.

Does this still work with libmnl?I'm thinking we need a new "Library Setup
[CURRENT]" section to document available flags (including e.g. NFQA_CFG_F_GSO
that examples/nf-queue.c uses).

Maybe we need Attribute helper functions as well? (documentation *and* new
code).

Cheers ... Duncan.

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Documentation question
@ 2019-12-15  2:02 Duncan Roe
  2019-12-20  0:29 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 15+ messages in thread
From: Duncan Roe @ 2019-12-15  2:02 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: Netfilter Development

Hi Pablo,

In pktbuff.c, the doc for pktb_mangle states that "It is appropriate to use
pktb_mangle to change the MAC header".

This is not true. pktb_mangle always mangles from the network header onwards.

I can either:

Whithdraw the offending doc items

OR:

Adjust pktb_mangle to make the doc correct. This involves changing pktb_mangle,
nfq_ip_mangle and (soon) nfq_ip6_mangle. The changes would be a no-op for
AF_INET and AF_INET6 packet buffers.

What do you think?

Cheers ... Duncan.

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Documentation question
@ 2021-07-04 23:45 Duncan Roe
  2021-07-05  8:56 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 15+ 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] 15+ messages in thread

end of thread, other threads:[~2021-07-05 14:42 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-30  9:07 Documentation question Duncan Roe
2019-10-30  9:15 ` Pablo Neira Ayuso
2019-10-30  9:38   ` Duncan Roe
2019-10-30  9:47     ` Pablo Neira Ayuso
2019-11-20 23:09 Duncan Roe
2019-11-20 23:26 ` Florian Westphal
2019-11-21  5:33   ` Duncan Roe
2019-12-15  2:02 Duncan Roe
2019-12-20  0:29 ` Pablo Neira Ayuso
2019-12-21 10:43   ` Duncan Roe
2019-12-22  2:23     ` Duncan Roe
2021-07-04 23:45 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

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).