Patchwork [libnetfilter_queue,1/2] doxygen: improve fail-open documentation.

login
register
mail settings
Submitter Eric Leblond
Date Jan. 13, 2013, 10:49 p.m.
Message ID <1358117376-7522-1-git-send-email-eric@regit.org>
Download mbox | patch
Permalink /patch/211660/
State Accepted
Headers show

Comments

Eric Leblond - Jan. 13, 2013, 10:49 p.m.
---
 src/libnetfilter_queue.c |    8 ++++++++
 1 file changed, 8 insertions(+)

Patch

diff --git a/src/libnetfilter_queue.c b/src/libnetfilter_queue.c
index 9fe9dfa..f93ac66 100644
--- a/src/libnetfilter_queue.c
+++ b/src/libnetfilter_queue.c
@@ -87,6 +87,8 @@ 
  * (requires Linux kernel >= 2.6.30).
  * - see --queue-balance option in NFQUEUE target for multi-threaded apps
  * (it requires Linux kernel >= 2.6.31).
+ * - consider using fail-open option see nfq_set_queue_flags() (it requires
+ *  Linux kernel >= 3.6)
  */
 
 struct nfq_handle
@@ -620,6 +622,12 @@  int nfq_set_mode(struct nfq_q_handle *qh,
 	flags &= ~NFQA_CFG_F_FAIL_OPEN;
 	err = nfq_set_queue_flags(qh, mask, flags);
 \endverbatim
+ *
+ * If NFQA_CFG_F_FAIL_OPEN is used, the kernel will accept instead of
+ * drop packets that should have been enqueued to a full queue. This
+ * results in the system being able to handle high network load but at
+ * the depend of the control on the packets.
+ *
  * \return -1 on error with errno set appropriately; =0 otherwise.
  */
 int nfq_set_queue_flags(struct nfq_q_handle *qh,