netfilter: nf_tables: skip flowtable hooknum and priority on device updates
authorPablo Neira Ayuso <pablo@netfilter.org>
Sat, 23 May 2020 10:05:22 +0000 (12:05 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 27 May 2020 20:20:35 +0000 (22:20 +0200)
commit5b6743fb2c2a1fcb31c8b227558f537095dbece4
tree3b29363975617ecbac76c530892c1bdafd00bb25
parent05abe4456fa376040f6cc3cc6830d2e328723478
netfilter: nf_tables: skip flowtable hooknum and priority on device updates

On device updates, the hooknum and priority attributes are not required.
This patch makes optional these two netlink attributes.

Moreover, bail out with EOPNOTSUPP if userspace tries to update the
hooknum and priority for existing flowtables.

While at this, turn EINVAL into EOPNOTSUPP in case the hooknum is not
ingress. EINVAL is reserved for missing netlink attribute / malformed
netlink messages.

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