Skip to contentSkip to conversation

libnetfilter_queue callback and verdict order

DISCUSSION Eric Leblond 1 participant 1 message Aug 2, 2013 1 message not in the archive netfilter

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Hi,

Quoted 6 lines · medialy

I am developing an application base on libnetfilter_queue to filter http traffic(CentOS 5.5 x86_64). In order to make full use of multi-CPU, I try to use a read thread(where recv and nfq_handle_packet are called) and several verdict threads(where nfq_set_verdict2 is called).

My questions are:
Can the parameter value in cb(qh, nfmsg, nfa, data) function used in verdict thread?

No, the netlink message will be discarded at the end of the callback.

Quoted 1 line

Can the packet be verdict without order?

Yes.

See
https://home.regit.org/netfilter-en/using-nfqueue-and-libnetfilter_queue/
for more information.

BR,
--
Eric