]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
netlink: specs: enforce strict naming of properties
authorJakub Kicinski <kuba@kernel.org>
Tue, 24 Jun 2025 21:10:02 +0000 (14:10 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 25 Jun 2025 22:36:28 +0000 (15:36 -0700)
commitaf852f1f1c951d43b36881302fd10d9f898cdb54
treeaa51d72493612b27fefe84ecdc11cee177596158
parenteef0eaeca7fa8e358a31e89802f564451b797718
netlink: specs: enforce strict naming of properties

Add a regexp to make sure all names which may end up being visible
to the user consist of lower case characters, numbers and dashes.
Underscores keep sneaking into the specs, which is not visible
in the C code but makes the Python and alike inconsistent.

Note that starting with a number is okay, as in C the full
name will include the family name.

For legacy families we can't enforce the naming in the family
name or the multicast group names, as these are part of the
binary uAPI of the kernel.

For classic netlink we need to allow capital letters in names
of struct members. TC has some structs with capitalized members.

Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Link: https://patch.msgid.link/20250624211002.3475021-11-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/netlink/genetlink-legacy.yaml
Documentation/netlink/genetlink.yaml
Documentation/netlink/netlink-raw.yaml