]> Gentwo Git Trees - linux/.git/commit
tools: ynl-gen: use macro for binary min-len check
authorAsbjørn Sloth Tønnesen <ast@fiberby.net>
Tue, 2 Sep 2025 15:46:36 +0000 (15:46 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 3 Sep 2025 22:16:49 +0000 (15:16 -0700)
commit5fece054451b3f812876a0bf1ba1a752da2cb532
tree47ce66cd9a0dfd3638fae463e4db5a9eb6c1f538
parent9f9581ba74a931843c6d807ecfeaff9fb8c1b731
tools: ynl-gen: use macro for binary min-len check

This patch changes the generated min-len check for binary
attributes to use the NLA_POLICY_MIN_LEN() macro, thereby the
generated code supports strict policy validation.

With this change TypeBinary will always generate a NLA_BINARY
attribute policy.

This doesn't change any currently generated code, as it isn't
used in any specs currently used for generating code.

Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Link: https://patch.msgid.link/20250902154640.759815-3-ast@fiberby.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/net/ynl/pyynl/ynl_gen_c.py