netfilter: nf_tables: fix chain filter in nf_tables_dump_rules()
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 19 Dec 2017 11:01:21 +0000 (12:01 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Mar 2018 09:24:28 +0000 (10:24 +0100)
commite2f52fa3f8d6fa949afebbb4dc24f71bc0785803
tree6a538d8688910580992f013677e9a038e93bfd9d
parentdef8d0ae4ac9a1dd9fb6e8a7ffe6aadf2893d848
netfilter: nf_tables: fix chain filter in nf_tables_dump_rules()

[ Upstream commit 24c0df82ef7919e4d10cf2e4e65d368eb2e8ea21 ]

ctx->chain may be null now that we have very large object names,
so we cannot check for ctx->chain[0] here.

Fixes: b7263e071aba7 ("netfilter: nf_tables: Allow table names of up to 255 chars")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/netfilter/nf_tables_api.c