Linux Netfilter development
 help / color / mirror / Atom feed
From: Eric Leblond <eric@inl.fr>
To: netfilter-devel@vger.kernel.org
Cc: Eric Leblond <eric@inl.fr>
Subject: [ULOGD PATCH 1/5] Fix treatment of return from function
Date: Sat,  9 Feb 2008 13:36:31 +0100	[thread overview]
Message-ID: <12025605953450-git-send-email-eric@inl.fr> (raw)
In-Reply-To: <12025605952271-git-send-email-eric@inl.fr>

The treatment of the return of some functions from libnetfilter_log API was wrong and this
was preventing some fields to be propagated through the stack.

Signed-off-by: Eric Leblond <eric@inl.fr>
---
:100644 100644 be46fa2... 1b8e32c... M	input/packet/ulogd_inppkt_NFLOG.c
 input/packet/ulogd_inppkt_NFLOG.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/input/packet/ulogd_inppkt_NFLOG.c b/input/packet/ulogd_inppkt_NFLOG.c
index be46fa2..1b8e32c 100644
--- a/input/packet/ulogd_inppkt_NFLOG.c
+++ b/input/packet/ulogd_inppkt_NFLOG.c
@@ -317,11 +317,11 @@ interp_packet(struct ulogd_pluginstance *upi, struct nflog_data *ldata)
 		ret[NFLOG_KEY_OOB_IFINDEX_OUT].flags |= ULOGD_RETF_VALID;
 	}
 
-	if (nflog_get_seq(ldata, &seq)) {
+	if (nflog_get_seq(ldata, &seq) == 0) {
 		ret[NFLOG_KEY_OOB_SEQ_LOCAL].u.value.ui32 = seq;
 		ret[NFLOG_KEY_OOB_SEQ_LOCAL].flags |= ULOGD_RETF_VALID;
 	}
-	if (nflog_get_seq_global(ldata, &seq)) {
+	if (nflog_get_seq_global(ldata, &seq) == 0) {
 		ret[NFLOG_KEY_OOB_SEQ_GLOBAL].u.value.ui32 = seq;
 		ret[NFLOG_KEY_OOB_SEQ_GLOBAL].flags |= ULOGD_RETF_VALID;
 	}
-- 
1.5.2.5


  reply	other threads:[~2008-02-09 12:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-09 12:36 [ULOGD PATCH 0/5] UID dump support in NFLOG, IPCMPv6 support in SQL Eric Leblond
2008-02-09 12:36 ` Eric Leblond [this message]
2008-02-09 17:28   ` [ULOGD PATCH 1/5] Fix treatment of return from function Pablo Neira Ayuso
2008-02-09 17:31   ` Pablo Neira Ayuso
2008-02-09 12:36 ` [ULOGD PATCH 2/5] Factorize definition of some macros Eric Leblond
2008-02-09 17:33   ` Pablo Neira Ayuso
2008-02-09 12:36 ` [PATCH 3/5] Add Icmpv6 support to SQL schema Eric Leblond
2008-02-09 17:39   ` Pablo Neira Ayuso
2008-02-09 12:36 ` [ULOGD PATCH 4/5] Add support for UID dumping to NFLOG input plugin Eric Leblond
2008-02-09 17:40   ` Pablo Neira Ayuso
2008-02-09 12:36 ` [ULOGD PATCH 5/5] Add UID display to PRINTPKT filter Eric Leblond
2008-02-09 17:43   ` Pablo Neira Ayuso
2008-02-09 17:44 ` [ULOGD PATCH 0/5] UID dump support in NFLOG, IPCMPv6 support in SQL Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=12025605953450-git-send-email-eric@inl.fr \
    --to=eric@inl.fr \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox