]> git.ipfire.org Git - thirdparty/ulogd2.git/commitdiff
NFCT: use nfct_copy() instead of deprecated nfct_sizeof() function
authorPablo Neira Ayuso <pablo@netfilter.org>
Fri, 25 Feb 2011 13:10:24 +0000 (14:10 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 25 Feb 2011 13:10:24 +0000 (14:10 +0100)
nfct_sizeof() allows memcpy() of ct objects, which violates the
library design (that aims to hide binary layout).

We use nfct_copy() with the override flag instead as added by
libnetfilter_conntrack 0.9.1.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
input/flow/ulogd_inpflow_NFCT.c

index af4fec6d22177060ac86478a67d9f81669136f6d..31535a9bcfa442d99f37aace425c226f2db9200d 100644 (file)
@@ -577,7 +577,7 @@ do_propagate_ct(struct ulogd_pluginstance *upi,
         * Thus, we only copy the object once, then it is used 
         * by the several output plugin instance that reference 
         * it by means of a pointer. */
-       memcpy(cpi->ct, ct, nfct_sizeof(ct));
+       nfct_copy(cpi->ct, ct, NFCT_CP_OVERRIDE);
 
        /* since we support the re-use of one instance in
         * several different stacks, we duplicate the message