netfilter: nf_tables: simplify NLM_F_CREATE handling
authorPablo Neira Ayuso <pablo@netfilter.org>
Fri, 3 Aug 2018 11:35:36 +0000 (13:35 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 3 Aug 2018 19:15:11 +0000 (21:15 +0200)
commit445509eb9b00278b31c92f16b05260176a41c27f
tree3ff814ef7987f171a8317605557c606e67f67a03
parent94276fa8a2a4c08ccb2e9d55e88b95dc972ccea3
netfilter: nf_tables: simplify NLM_F_CREATE handling

* From nf_tables_newchain(), codepath provides context that allows us to
  infer if we are updating a chain (in that case, no module autoload is
  required) or adding a new one (then, module autoload is indeed
  needed).
* We only need it in one single spot in nf_tables_newrule().
* Not needed for nf_tables_newset() at all.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c