]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
datatype: dtype_clone() should clone flags too
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 12 Jun 2019 11:58:22 +0000 (13:58 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 13 Jun 2019 10:22:41 +0000 (12:22 +0200)
Clone original flags too.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/datatype.c

index 43cf45bdd7a15421d741cb1ea170ad57068d00c7..8ae3aa1c3f905ee352f5d880302089583fc3fce2 100644 (file)
@@ -1103,7 +1103,7 @@ static struct datatype *dtype_clone(const struct datatype *orig_dtype)
        *dtype = *orig_dtype;
        dtype->name = xstrdup(orig_dtype->name);
        dtype->desc = xstrdup(orig_dtype->desc);
-       dtype->flags = DTYPE_F_ALLOC;
+       dtype->flags = DTYPE_F_ALLOC | orig_dtype->flags;
        dtype->refcnt = 0;
 
        return dtype;