From: Florian Westphal <fw@strlen.de>
To: Joern Heissler <nfdevel@joern.heissler.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: Possible bug in __nfnl_handle_msg
Date: Fri, 27 Jun 2014 00:14:29 +0200 [thread overview]
Message-ID: <20140626221429.GA23488@breakpoint.cc> (raw)
In-Reply-To: <20140626205023.GA32347@joerntop.localnet>
Joern Heissler <nfdevel@joern.heissler.de> wrote:
> Hi,
>
> I'm trying to use libnetfilter_log and I think I might have found a bug :)
Looks like nfnl_handle_packet doesn't handle control messages (like NLMSG_DONE).
I don't understand libnfnetlink here, specifically why
nfnl_handle_packet exists in first place, seems like it was superseded
by nfnl_process(), so I *thought* a quick fix is
--- a/src/libnetfilter_log.c
+++ b/src/libnetfilter_log.c
@@ -322,7 +322,7 @@ int nflog_callback_register(struct nflog_g_handle *gh, nflog_callback *cb,
int nflog_handle_packet(struct nflog_handle *h, char *buf, int len)
{
- return nfnl_handle_packet(h->nfnlh, buf, len);
+ return nfnl_process(h->nfnlh, (unsigned char *) buf, len);
}
But that breaks probably every user of the library since
nfnl_process() expects cb to return NFNL_CB_CONTINUE (== 1)
and not 0 (which makes _process top iterating).
But 0 is what the examples use :-(
'someone' has to touch libnfnetlink it seems...
prev parent reply other threads:[~2014-06-26 22:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-26 20:50 Possible bug in __nfnl_handle_msg Joern Heissler
2014-06-26 22:14 ` Florian Westphal [this message]
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=20140626221429.GA23488@breakpoint.cc \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=nfdevel@joern.heissler.de \
/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 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.