summaryrefslogtreecommitdiffstats
path: root/filter
diff options
context:
space:
mode:
author/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org>2008-02-09 17:34:00 +0000
committer/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org>2008-02-09 17:34:00 +0000
commit7b3858d675615535476ff068d7853afacdd1de55 (patch)
tree7b92b2c23dea90d2f63edc6d1a2354117f26872d /filter
parentd33f268c307d783b868125e206a0b13af10261a5 (diff)
From: Eric Leblond <eric@inl.fr>
Some macros were defined several time. This was the case of GET_VALUE, pp_is_valid. This patch puts the definition in ulogd.h and fixes the definition of pp_is_valid which was wrong (causing segfault by acessing to fields at NULL).
Diffstat (limited to 'filter')
-rw-r--r--filter/ulogd_filter_IP2BIN.c5
-rw-r--r--filter/ulogd_filter_IP2STR.c5
2 files changed, 0 insertions, 10 deletions
diff --git a/filter/ulogd_filter_IP2BIN.c b/filter/ulogd_filter_IP2BIN.c
index e490b64..9b0110e 100644
--- a/filter/ulogd_filter_IP2BIN.c
+++ b/filter/ulogd_filter_IP2BIN.c
@@ -114,11 +114,6 @@ static struct ulogd_key ip2bin_keys[] = {
};
-#define GET_VALUE(res, x) (res[x].u.source->u.value)
-#define GET_FLAGS(res, x) (res[x].u.source->flags)
-#define pp_is_valid(res, x) \
- (res[x].u.source && (GET_FLAGS(res, x) & ULOGD_RETF_VALID))
-
/**
* Convert IPv4 address (as 32-bit unsigned integer) to IPv6 address:
* add 96 bits prefix "::ffff:" to get IPv6 address "::ffff:a.b.c.d".
diff --git a/filter/ulogd_filter_IP2STR.c b/filter/ulogd_filter_IP2STR.c
index 2a61220..39edc05 100644
--- a/filter/ulogd_filter_IP2STR.c
+++ b/filter/ulogd_filter_IP2STR.c
@@ -113,11 +113,6 @@ static struct ulogd_key ip2str_keys[] = {
},
};
-#define GET_VALUE(res, x) (res[x].u.source->u.value)
-#define GET_FLAGS(res, x) (res[x].u.source->flags)
-#define pp_is_valid(res, x) \
- (res[x].u.source && (GET_FLAGS(res, x) & ULOGD_RETF_VALID))
-
static char *ip2str(struct ulogd_key* inp, int index, char family)
{
char tmp[IPADDR_LENGTH];