ynl: ensure exact-len value is resolved
authorAntonio Quartulli <a@unstable.cc>
Fri, 10 May 2024 23:22:02 +0000 (01:22 +0200)
committerJakub Kicinski <kuba@kernel.org>
Mon, 13 May 2024 21:59:24 +0000 (14:59 -0700)
commitec8c25746e3232634f7842755a0c4bc08def6a49
tree04fa6b844a26fb28a2ba99ed13891f2409c43bb1
parente5a280261c7d6973b54a9517b314610a4054f701
ynl: ensure exact-len value is resolved

For type String and Binary we are currently usinig the exact-len
limit value as is without attempting any name resolution.
However, the spec may specify the name of a constant rather than an
actual value, which would result in using the constant name as is
and thus break the policy.

Ensure the limit value is passed to get_limit(), which will always
attempt resolving the name before printing the policy rule.

Signed-off-by: Antonio Quartulli <a@unstable.cc>
Link: https://lore.kernel.org/r/20240510232202.24051-1-a@unstable.cc
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/net/ynl/ynl-gen-c.py