From ad6426bc6da725dc3a1059a96787300e3fd69c61 Mon Sep 17 00:00:00 2001 From: "/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org" Date: Sat, 30 Jul 2005 20:46:43 +0000 Subject: new directory structure, make sure include files are installed properly --- src/libipulog_compat.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/libipulog_compat.c b/src/libipulog_compat.c index b59d55a..b6fc82e 100644 --- a/src/libipulog_compat.c +++ b/src/libipulog_compat.c @@ -6,7 +6,7 @@ #include #include #include -#include +#include /* private */ #define PAYLOAD_SIZE 0xffff @@ -128,8 +128,10 @@ ulog_packet_msg_t *ipulog_get_packet(struct ipulog_handle *h, if (!h->last_nlh) nlh = nfnl_get_msg_first(&h->nfulh.nfnlh, buf, len); - else + else { +next_msg: nlh = nfnl_get_msg_next(&h->nfulh.nfnlh, buf, len); + } h->last_nlh = nlh; if (!nlh) @@ -137,12 +139,13 @@ ulog_packet_msg_t *ipulog_get_packet(struct ipulog_handle *h, nfnl_parse_attr(tb, NFULA_MAX, NFM_NFA(nlh), NFM_PAYLOAD(nlh)); - if (!tb[NFULA_PACKET_HDR-1]) { - /* ERROR */ - } - hdr = NFA_DATA(tb[NFULA_PACKET_HDR-1]); + if (!tb[NFULA_PACKET_HDR-1]) + goto next_msg; + /* now build the fake ulog_packet_msg */ + hdr = NFA_DATA(tb[NFULA_PACKET_HDR-1]); h->upmsg.hook = hdr->hook; + if (tb[NFULA_MARK-1]) h->upmsg.mark = ntohl(*(u_int32_t *)NFA_DATA(tb[NFULA_MARK-1])); else -- cgit v1.2.3