]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net/sched: cls_flower: add policy for TCA_FLOWER_KEY_FLAGS
authorAsbjørn Sloth Tønnesen <ast@fiberby.net>
Sat, 13 Jul 2024 02:19:02 +0000 (02:19 +0000)
committerJakub Kicinski <kuba@kernel.org>
Mon, 15 Jul 2024 16:14:38 +0000 (09:14 -0700)
commit0e83a7875d691f5b76c87d9223b22e5a0d34511e
tree5e1963607a5b86c062408cd999c5420f501ee200
parentfcb4bb07a9276bfb63c82ce5e8c4f8ff23646635
net/sched: cls_flower: add policy for TCA_FLOWER_KEY_FLAGS

This policy guards fl_set_key_flags() from seeing flags
not used in the context of TCA_FLOWER_KEY_FLAGS.

In order For the policy check to be performed with the
correct endianness, then we also needs to change the
attribute type to NLA_BE32 (Thanks Davide).

TCA_FLOWER_KEY_FLAGS{,_MASK} already has a be32 comment
in include/uapi/linux/pkt_cls.h.

Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>
Tested-by: Davide Caratti <dcaratti@redhat.com>
Reviewed-by: Davide Caratti <dcaratti@redhat.com>
Link: https://patch.msgid.link/20240713021911.1631517-6-ast@fiberby.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/sched/cls_flower.c