netfilter: nf_tables: fix chain filter in nf_tables_dump_rules()
Subsystems (2)
Pablo Neira Ayuso
maintainerPATCH 1/1 netfilter: nf_tables: fix chain filter in nf_tables_dump_rules()
ctx->chain may be null now that we have very large object names, so we cannot check for ctx->chain[0] here.
Fixes e46abbcc05aa ("netfilter: nf_tables: Allow table names of up to 255 chars")
Signed-off-by Pablo Neira Ayuso <[email protected]>
--- net/netfilter/nf_tables_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/nf_tables_api.c +1 -1
@@ -2072,7 +2072,7 @@ static int nf_tables_dump_rules(struct sk_buff *skb,continue ;list_for_each_entry_rcu (chain, &table->chains, list) { -if (ctx && ctx->chain[0 ] && +if (ctx && ctx->chain &&strcmp (ctx->chain, chain->name) !=0 )continue ;
Signature · 1 line
2.11.0
Quoted 4 lines · Pablo Neira Ayuso
ctx->chainmay be null now that we have very large object names, so we cannot check for ctx->chain[0] here.Fixes e46abbcc05aa ("netfilter: nf_tables: Allow table names of up to 255 chars")
This really fixes:
b7263e071aba7 ("netfilter: nf_tables: Allow chain name of up to 255 chars")
Quoted 1 line
Signed-off-by Pablo Neira Ayuso <[email protected]>
Apart from that:
Acked-by Phil Sutter <[email protected]>
Thanks, Phil
Pablo Neira Ayuso
maintainerQuoted 9 lines · Phil Sutter
Quoted 4 lines · Pablo Neira Ayuso
ctx->chainmay be null now that we have very large object names, so we cannot check for ctx->chain[0] here.Fixes e46abbcc05aa ("netfilter: nf_tables: Allow table names of up to 255 chars")This really fixes:
b7263e071aba7("netfilter:nf_tables: Allow chain name of up to 255 chars")
Will fix it here.
Quoted 5 lines
Quoted 1 line
Signed-off-by Pablo Neira Ayuso <[email protected]>Apart from that:
Acked-by Phil Sutter <[email protected]>
Thanks for reviewing!