diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-08-25 03:18:30 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-08-29 14:47:15 +0300 |
commit | 9c5d03d362519f36cd551aec596388f895c93d2d (patch) | |
tree | 5669b75a062436435dc9d4354c668d0f61b7146c /net/ipv6/ioam6.c | |
parent | 53a406803ca5b0b1f91beffacad4321fae4fa2a7 (diff) | |
download | linux-9c5d03d362519f36cd551aec596388f895c93d2d.tar.xz |
genetlink: start to validate reserved header bytes
We had historically not checked that genlmsghdr.reserved
is 0 on input which prevents us from using those precious
bytes in the future.
One use case would be to extend the cmd field, which is
currently just 8 bits wide and 256 is not a lot of commands
for some core families.
To make sure that new families do the right thing by default
put the onus of opting out of validation on existing families.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Acked-by: Paul Moore <paul@paul-moore.com> (NetLabel)
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ioam6.c')
-rw-r--r-- | net/ipv6/ioam6.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv6/ioam6.c b/net/ipv6/ioam6.c index 1098131ed90c..571f0e4d9cf3 100644 --- a/net/ipv6/ioam6.c +++ b/net/ipv6/ioam6.c @@ -619,6 +619,7 @@ static struct genl_family ioam6_genl_family __ro_after_init = { .parallel_ops = true, .ops = ioam6_genl_ops, .n_ops = ARRAY_SIZE(ioam6_genl_ops), + .resv_start_op = IOAM6_CMD_NS_SET_SCHEMA + 1, .module = THIS_MODULE, }; |