From 73b9805968e430d4328f5eca78574b6c0987f2cf Mon Sep 17 00:00:00 2001 From: Ken-ichirou MATSUZAWA Date: Sat, 7 Dec 2013 20:23:10 +0900 Subject: examples: fix trivial error message Signed-off-by: Ken-ichirou MATSUZAWA Signed-off-by: Florian Westphal --- examples/netfilter/nf-log.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'examples/netfilter/nf-log.c') diff --git a/examples/netfilter/nf-log.c b/examples/netfilter/nf-log.c index a862912..901bd80 100644 --- a/examples/netfilter/nf-log.c +++ b/examples/netfilter/nf-log.c @@ -39,14 +39,14 @@ static int parse_attr_cb(const struct nlattr *attr, void *data) case NFULA_TIMESTAMP: if (mnl_attr_validate2(attr, MNL_TYPE_UNSPEC, sizeof(struct nfulnl_msg_packet_timestamp)) < 0) { - perror("mnl_attr_validate"); + perror("mnl_attr_validate2"); return MNL_CB_ERROR; } break; case NFULA_HWADDR: if (mnl_attr_validate2(attr, MNL_TYPE_UNSPEC, sizeof(struct nfulnl_msg_packet_hw)) < 0) { - perror("mnl_attr_validate"); + perror("mnl_attr_validate2"); return MNL_CB_ERROR; } break; @@ -174,28 +174,28 @@ int main(int argc, char *argv[]) nlh = nflog_build_cfg_pf_request(buf, NFULNL_CFG_CMD_PF_UNBIND); if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) { - perror("mnl_socket_send"); + perror("mnl_socket_sendto"); exit(EXIT_FAILURE); } nlh = nflog_build_cfg_pf_request(buf, NFULNL_CFG_CMD_PF_BIND); if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) { - perror("mnl_socket_send"); + perror("mnl_socket_sendto"); exit(EXIT_FAILURE); } nlh = nflog_build_cfg_request(buf, NFULNL_CFG_CMD_BIND, qnum); if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) { - perror("mnl_socket_send"); + perror("mnl_socket_sendto"); exit(EXIT_FAILURE); } nlh = nflog_build_cfg_params(buf, NFULNL_COPY_PACKET, 0xFFFF, qnum); if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) { - perror("mnl_socket_send"); + perror("mnl_socket_sendto"); exit(EXIT_FAILURE); } -- cgit v1.2.3 From b180a6ee27674b5060cf54a0149a9109da9d9fd1 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 25 May 2015 20:51:09 +0200 Subject: example: netfilter: get rid of aligned_be64 definitions This is defined in , which is included by the nfnetlink_* header files. Thus, we can get rid of u_int64_t which causes problems to musl according to Felix Janda. Signed-off-by: Pablo Neira Ayuso --- examples/netfilter/nf-log.c | 5 ----- examples/netfilter/nf-queue.c | 5 ----- 2 files changed, 10 deletions(-) (limited to 'examples/netfilter/nf-log.c') diff --git a/examples/netfilter/nf-log.c b/examples/netfilter/nf-log.c index 901bd80..4383b66 100644 --- a/examples/netfilter/nf-log.c +++ b/examples/netfilter/nf-log.c @@ -9,11 +9,6 @@ #include #include #include - -#ifndef aligned_be64 -#define aligned_be64 u_int64_t __attribute__((aligned(8))) -#endif - #include static int parse_attr_cb(const struct nlattr *attr, void *data) diff --git a/examples/netfilter/nf-queue.c b/examples/netfilter/nf-queue.c index 72779f0..957e365 100644 --- a/examples/netfilter/nf-queue.c +++ b/examples/netfilter/nf-queue.c @@ -9,11 +9,6 @@ #include #include #include - -#ifndef aligned_be64 -#define aligned_be64 u_int64_t __attribute__((aligned(8))) -#endif - #include static int parse_attr_cb(const struct nlattr *attr, void *data) -- cgit v1.2.3