diff options
author | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org> | 2005-07-30 20:46:43 +0000 |
---|---|---|
committer | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org> | 2005-07-30 20:46:43 +0000 |
commit | 379a883c5355b7c139e368e3a6778671c26c7baf (patch) | |
tree | 3b7f0c8906c1f93b880e856c8c1b2517803262d2 /_log/src | |
parent | 843ec270ef95f0abc5698936b6840abc07f541aa (diff) |
new directory structure, make sure include files are installed properly
Diffstat (limited to '_log/src')
-rw-r--r-- | _log/src/libipulog_compat.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/_log/src/libipulog_compat.c b/_log/src/libipulog_compat.c index b59d55a..b6fc82e 100644 --- a/_log/src/libipulog_compat.c +++ b/_log/src/libipulog_compat.c @@ -6,7 +6,7 @@ #include <sys/socket.h> #include <netinet/in.h> #include <libnfnetlink_log/libnfnetlink_log.h> -#include <libipulog/libipulog.h> +#include <libnfnetlink_log/libipulog.h> /* 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 |