diff options
author | Patrick McHardy <kaber@trash.net> | 2015-04-11 02:27:38 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-04-13 17:17:30 +0200 |
commit | d0a11fc3dc4ab4c717642c9c15c8ad1cbc00d2ec (patch) | |
tree | d3dca65a7ca6c2e95b11d9dd108bdeec660b957c /net/netfilter/nft_immediate.c | |
parent | 49499c3e6e18b7677a63316f3ff54a16533dc28f (diff) | |
download | linux-d0a11fc3dc4ab4c717642c9c15c8ad1cbc00d2ec.tar.bz2 |
netfilter: nf_tables: support variable sized data in nft_data_init()
Add a size argument to nft_data_init() and pass in the available space.
This will be used by the following patches to support variable sized
set element data.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nft_immediate.c')
-rw-r--r-- | net/netfilter/nft_immediate.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/netfilter/nft_immediate.c b/net/netfilter/nft_immediate.c index 1e8e412eadae..db3b746858e3 100644 --- a/net/netfilter/nft_immediate.c +++ b/net/netfilter/nft_immediate.c @@ -49,7 +49,8 @@ static int nft_immediate_init(const struct nft_ctx *ctx, tb[NFTA_IMMEDIATE_DATA] == NULL) return -EINVAL; - err = nft_data_init(ctx, &priv->data, &desc, tb[NFTA_IMMEDIATE_DATA]); + err = nft_data_init(ctx, &priv->data, sizeof(priv->data), &desc, + tb[NFTA_IMMEDIATE_DATA]); if (err < 0) return err; priv->dlen = desc.len; |