diff options
author | Phil Sutter <phil@nwl.cc> | 2017-07-27 16:56:41 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-07-31 20:41:57 +0200 |
commit | e46abbcc05aa8a16b0e7f5c94e86d11af9aa2770 (patch) | |
tree | 8f5688c722893d30b0083365c7b01d01a03e56c0 /net/netfilter/nf_tables_trace.c | |
parent | 2cf0c8b3e6942ecafe6ebb1a6d0328a81641bf39 (diff) | |
download | linux-stable-e46abbcc05aa8a16b0e7f5c94e86d11af9aa2770.tar.gz linux-stable-e46abbcc05aa8a16b0e7f5c94e86d11af9aa2770.tar.bz2 linux-stable-e46abbcc05aa8a16b0e7f5c94e86d11af9aa2770.zip |
netfilter: nf_tables: Allow table names of up to 255 chars
Allocate all table names dynamically to allow for arbitrary lengths but
introduce NFT_NAME_MAXLEN as an upper sanity boundary. It's value was
chosen to allow using a domain name as per RFC 1035.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nf_tables_trace.c')
-rw-r--r-- | net/netfilter/nf_tables_trace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nf_tables_trace.c b/net/netfilter/nf_tables_trace.c index 0c3a0049e4aa..62787d985e9d 100644 --- a/net/netfilter/nf_tables_trace.c +++ b/net/netfilter/nf_tables_trace.c @@ -175,7 +175,7 @@ void nft_trace_notify(struct nft_traceinfo *info) return; size = nlmsg_total_size(sizeof(struct nfgenmsg)) + - nla_total_size(NFT_TABLE_MAXNAMELEN) + + nla_total_size(strlen(info->chain->table->name)) + nla_total_size(NFT_CHAIN_MAXNAMELEN) + nla_total_size_64bit(sizeof(__be64)) + /* rule handle */ nla_total_size(sizeof(__be32)) + /* trace type */ |