On Sat, Aug 26, 2017 at 09:26:25PM +0200, Florian Westphal wrote: > Oleg <lego12239@xxxxxxxxx> wrote: > > Hi, all. > > > > My program process multiple NFQUEUEs by creating a separate thread > > for every NFQUEUE. An each thread do recv() and nfq_set_verdict2(): > > > > But i catch a strange behaviour when more than 1 thread(queue) are > > used. In those cases one queue "freeze" while others works right. > > For example, for 5 queues(here a queue with id 1 "freeze"): > > If you use libnetfilter_queue you might need > > commit 4ca06bc967d94b7b7b5a6efc76e870f0efc77e24 > src: make nfq_open_nfnl thread-safe > > (or protect nfq_open_nfnl calls with a mutex). A mutex around nfq_open() seems to work. At least, 30 restarts didn't show a frozen on recvfrom() queue. Thanks! -- Олег Неманов (Oleg Nemanov) -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html