netfilter: nf_tables: add compatibility layer for x_tables
[deliverable/linux.git] / net / netfilter / nft_immediate.c
index 1bfeeaf865b6d173840eaeb8a114d14d712a07e5..f169501f1ad4389970613d1e44fb2b60759406cb 100644 (file)
@@ -90,14 +90,16 @@ nla_put_failure:
        return -1;
 }
 
-static const struct nft_data *nft_immediate_get_verdict(const struct nft_expr *expr)
+static int nft_immediate_validate(const struct nft_ctx *ctx,
+                                 const struct nft_expr *expr,
+                                 const struct nft_data **data)
 {
        const struct nft_immediate_expr *priv = nft_expr_priv(expr);
 
        if (priv->dreg == NFT_REG_VERDICT)
-               return &priv->data;
-       else
-               return NULL;
+               *data = &priv->data;
+
+       return 0;
 }
 
 static struct nft_expr_type nft_imm_type;
@@ -108,7 +110,7 @@ static const struct nft_expr_ops nft_imm_ops = {
        .init           = nft_immediate_init,
        .destroy        = nft_immediate_destroy,
        .dump           = nft_immediate_dump,
-       .get_verdict    = nft_immediate_get_verdict,
+       .validate       = nft_immediate_validate,
 };
 
 static struct nft_expr_type nft_imm_type __read_mostly = {
This page took 0.030694 seconds and 5 git commands to generate.