All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about nfnl_handle_packet/nfnl_process error handling
@ 2012-02-16 14:15 Florian Westphal
  2012-02-16 17:41 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Westphal @ 2012-02-16 14:15 UTC (permalink / raw)
  To: netfilter-devel

libnetfilter_queue has:

int nfq_handle_packet(struct nfq_handle *h, char *buf, int len)
{
   return nfnl_handle_packet(h->nfnlh, buf, len);
}

When an error occurs, for example because a verdict for a bogus packet id was
sent, nfq_handle_packet/nfnl_handle_packet returns -1 with errno == 0.

Using nfnl_process() instead of nfq_handle_packet() sets errno to the expected
ENOENT.

Does anyone know if nfq_handle_packet() "errno 0" behaviour is intentional?
Should I just ignore nfq_handle_packet() return value?
What about deprecating nfnl_handle_packet() and using nfnl_process()
instead?

Thanks,
Florian

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

end of thread, other threads:[~2012-02-16 21:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-16 14:15 Question about nfnl_handle_packet/nfnl_process error handling Florian Westphal
2012-02-16 17:41 ` Pablo Neira Ayuso
2012-02-16 21:41   ` Florian Westphal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.