[libnetfilter_log 3/3] Suppress NFULNL_MSG_CONFIG callback registration.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux