diff options
author | Phil Sutter <phil@nwl.cc> | 2018-12-12 19:29:07 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-12-18 00:08:53 +0100 |
commit | 241faeceb849cb02c6439ecb2a08f14bf409dd30 (patch) | |
tree | 199d846826be431d90c87a668025298caf9ada42 /README | |
parent | 8294059931448aa1ca112615bdffa3eab552c382 (diff) | |
download | linux-241faeceb849cb02c6439ecb2a08f14bf409dd30.tar.bz2 |
netfilter: nf_tables: Speed up selective rule dumps
If just a table name was given, nf_tables_dump_rules() continued over
the list of tables even after a match was found. The simple fix is to
exit the loop if it reached the bottom and ctx->table was not NULL.
When iterating over the table's chains, the same problem as above
existed. But worse than that, if a chain name was given the hash table
wasn't used to find the corresponding chain. Fix this by introducing a
helper function iterating over a chain's rules (and taking care of the
cb->args handling), then introduce a shortcut to it if a chain name was
given.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions