From 8bb0e3049b8a7f67d60ba2deed18584acce4eca6 Mon Sep 17 00:00:00 2001 From: Albert Veli Date: Tue, 29 Jul 2008 13:51:54 +0200 Subject: API: fix endianess issue In nfct_build_query() the *data argument is converted into a u_int8_t*. This works for little-endian but not for big-endian. Signed-off-by: Albert Veli Signed-off-by: Pablo Neira Ayuso --- src/conntrack/api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/conntrack/api.c b/src/conntrack/api.c index ff8b11f..8015440 100644 --- a/src/conntrack/api.c +++ b/src/conntrack/api.c @@ -443,7 +443,7 @@ int nfct_build_conntrack(struct nfnl_subsys_handle *ssh, * NFCT_Q_DUMP: dump the conntrack table * NFCT_Q_DUMP_RESET: dump the conntrack table and reset counters * - * Pass a valid pointer to the protocol family (u_int8_t) + * Pass a valid pointer to the protocol family (u_int32_t) * * On success, 0 is returned. On error, -1 is returned and errno is set * appropiately. @@ -455,7 +455,7 @@ int nfct_build_query(struct nfnl_subsys_handle *ssh, unsigned int size) { struct nfnlhdr *req = buffer; - const u_int8_t *family = data; + const u_int32_t *family = data; assert(ssh != NULL); assert(data != NULL); -- cgit v1.2.3