libipq and threads

Frank Abel Cancio Bello FRANKABEL at
Sat Apr 2 05:35:54 CEST 2005

Hi all!

Using QUEUE target I pretend mangle some type of packet(the first packets 
for each flow), but for modify each packet I need a lot of processing. If I 
make all in a single thread in some situation(burst of packet to mangle) the 
delay of packets might up.

Then I think raise one thread for mangle each packet and in this thread call 
the function 
"ipq_set_verdict" with the new payload. I look and find 

Due to libipq isn't thread-safe I must copy the payload of each packet and 
pass it to the new 
thread in order to avoid rewrite it when arrive a new packet while I'm 
changing the previous 
packet payload. See

My question is:
Exist other precaution that I must take?

Thank in advance


More information about the netfilter mailing list