]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - net/ipv4/netfilter/nft_masq_ipv4.c
netfilter: nf_tables: add conntrack dependencies for nat/masq/redir expressions
[mirror_ubuntu-artful-kernel.git] / net / ipv4 / netfilter / nft_masq_ipv4.c
index 4d69f99b8707a98db057199417cce39e14bc71e6..a0ea8aad1bf150bcb9e8e0aa2e6b45a5347599e4 100644 (file)
@@ -35,12 +35,19 @@ static void nft_masq_ipv4_eval(const struct nft_expr *expr,
                                                    &range, nft_out(pkt));
 }
 
+static void
+nft_masq_ipv4_destroy(const struct nft_ctx *ctx, const struct nft_expr *expr)
+{
+       nf_ct_netns_put(ctx->net, NFPROTO_IPV4);
+}
+
 static struct nft_expr_type nft_masq_ipv4_type;
 static const struct nft_expr_ops nft_masq_ipv4_ops = {
        .type           = &nft_masq_ipv4_type,
        .size           = NFT_EXPR_SIZE(sizeof(struct nft_masq)),
        .eval           = nft_masq_ipv4_eval,
        .init           = nft_masq_init,
+       .destroy        = nft_masq_ipv4_destroy,
        .dump           = nft_masq_dump,
        .validate       = nft_masq_validate,
 };