From: Eric Leblond <eric@inl.fr>
To: netfilter-devel@vger.kernel.org
Cc: Eric Leblond <eric@inl.fr>
Subject: [libnetfilter_log 3/3] Suppress NFULNL_MSG_CONFIG callback registration.
Date: Mon, 29 Dec 2008 22:33:24 +0100 [thread overview]
Message-ID: <1230586404-24639-4-git-send-email-eric@inl.fr> (raw)
In-Reply-To: <1230586404-24639-1-git-send-email-eric@inl.fr>
It seems there is no NFULNL_MSG_CONFIG message send from kernel space to
userspace. Thus the registration of an nfnetlink callback for this type
of messages is not necessary.
Signed-off-by: Eric Leblond <eric@inl.fr>
---
src/libnetfilter_log.c | 20 --------------------
1 files changed, 0 insertions(+), 20 deletions(-)
diff --git a/src/libnetfilter_log.c b/src/libnetfilter_log.c
index 9343f90..2bbc875 100644
--- a/src/libnetfilter_log.c
+++ b/src/libnetfilter_log.c
@@ -92,15 +92,6 @@ static struct nflog_g_handle *find_gh(struct nflog_handle *h, u_int16_t group)
return NULL;
}
-static int __nflog_rcv_cmd(struct nlmsghdr *nlh, struct nfattr *nfa[],
- void *data)
-{
- /* struct nflog_handle *h = data; */
-
- /* FIXME: implement this */
- return 0;
-}
-
/* build a NFULNL_MSG_CONFIG message */
static int
__build_send_cfg_msg(struct nflog_handle *h, u_int8_t command,
@@ -141,11 +132,6 @@ static int __nflog_rcv_pkt(struct nlmsghdr *nlh, struct nfattr *nfa[],
return gh->cb(gh, nfmsg, &nfldata, gh->data);
}
-static struct nfnl_callback cmd_cb = {
- .call = &__nflog_rcv_cmd,
- .attr_count = NFULA_CFG_MAX,
-};
-
static struct nfnl_callback pkt_cb = {
.call = &__nflog_rcv_pkt,
.attr_count = NFULA_MAX,
@@ -182,12 +168,6 @@ struct nflog_handle *nflog_open_nfnl(struct nfnl_handle *nfnlh)
goto out_free;
}
- cmd_cb.data = h;
- err = nfnl_callback_register(h->nfnlssh, NFULNL_MSG_CONFIG, &cmd_cb);
- if (err < 0) {
- nflog_errno = err;
- goto out_close;
- }
pkt_cb.data = h;
err = nfnl_callback_register(h->nfnlssh, NFULNL_MSG_PACKET, &pkt_cb);
if (err < 0) {
--
1.5.6.3
next prev parent reply other threads:[~2008-12-29 21:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-29 21:33 [libnetfilter_log 0/3] Misc code cleaning Eric Leblond
2008-12-29 21:33 ` [libnetfilter_log 1/3] Suppress reference to libnetfilter_queue which is the model of libnetfilter_log Eric Leblond
2008-12-30 11:19 ` Pablo Neira Ayuso
2008-12-29 21:33 ` [libnetfilter_log 2/3] Set nflog_errno as needed Eric Leblond
2008-12-30 11:19 ` Pablo Neira Ayuso
2008-12-29 21:33 ` Eric Leblond [this message]
2008-12-30 11:20 ` [libnetfilter_log 3/3] Suppress NFULNL_MSG_CONFIG callback registration 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=1230586404-24639-4-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;
as well as URLs for NNTP newsgroup(s).