]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitd14bf3843e71e532196973318989fff77390b677
tree3b29363975617ecbac76c530892c1bdafd00bb25
parent6f2ef2cf819898ad4462d9a9a5a5d8338d4af166
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