diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libipulog_compat.c | 3 | ||||
-rw-r--r-- | src/libnetfilter_log.c | 9 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/libipulog_compat.c b/src/libipulog_compat.c index a0de3cb..4efa501 100644 --- a/src/libipulog_compat.c +++ b/src/libipulog_compat.c @@ -133,10 +133,9 @@ ulog_packet_msg_t *ipulog_get_packet(struct ipulog_handle *h, struct nfulnl_msg_packet_hdr *hdr; if (!h->last_nlh) { - printf("first\n"); nlh = nfnl_get_msg_first(nflog_nfnlh(h->nfulh), buf, len); }else { -next_msg: printf("next\n"); +next_msg: nlh = nfnl_get_msg_next(nflog_nfnlh(h->nfulh), buf, len); } h->last_nlh = nlh; diff --git a/src/libnetfilter_log.c b/src/libnetfilter_log.c index cb09384..339c961 100644 --- a/src/libnetfilter_log.c +++ b/src/libnetfilter_log.c @@ -161,11 +161,6 @@ static int __nflog_rcv_pkt(struct nlmsghdr *nlh, struct nfattr *nfa[], return gh->cb(gh, nfmsg, &nfldata, gh->data); } -static struct nfnl_callback pkt_cb = { - .call = &__nflog_rcv_pkt, - .attr_count = NFULA_MAX, -}; - /* public interface */ struct nfnl_handle *nflog_nfnlh(struct nflog_handle *h) @@ -255,6 +250,10 @@ struct nflog_handle *nflog_open_nfnl(struct nfnl_handle *nfnlh) { struct nflog_handle *h; int err; + struct nfnl_callback pkt_cb = { + .call = &__nflog_rcv_pkt, + .attr_count = NFULA_MAX, + }; h = calloc(1, sizeof(*h)); if (!h) |