a702e988 | 20-Feb-2024 |
Jakub Kicinski <kuba@kernel.org> |
tools: ynl: don't leak mcast_groups on init error
[ Upstream commit 5d78b73e851455d525a064f3b042b29fdc0c1a4a ]
Make sure to free the already-parsed mcast_groups if we don't get an ack from the kern
tools: ynl: don't leak mcast_groups on init error
[ Upstream commit 5d78b73e851455d525a064f3b042b29fdc0c1a4a ]
Make sure to free the already-parsed mcast_groups if we don't get an ack from the kernel when reading family info. This is part of the ynl_sock_create() error path, so we won't get a call to ynl_sock_destroy() to free them later.
Fixes: 86878f14d71a ("tools: ynl: user space helpers") Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Link: https://lore.kernel.org/r/20240220161112.2735195-3-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
1768d8a7 | 25-Aug-2023 |
Donald Hunter <donald.hunter@gmail.com> |
tools/net/ynl: Add support for create flags
Add support for using NLM_F_REPLACE, _EXCL, _CREATE and _APPEND flags in requests.
Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Reviewed-by: Ja
tools/net/ynl: Add support for create flags
Add support for using NLM_F_REPLACE, _EXCL, _CREATE and _APPEND flags in requests.
Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://lore.kernel.org/r/20230825122756.7603-10-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
0493e56d | 25-Aug-2023 |
Donald Hunter <donald.hunter@gmail.com> |
tools/net/ynl: Implement nlattr array-nest decoding in ynl
Add support for the 'array-nest' attribute type that is used by several netlink-raw families.
Signed-off-by: Donald Hunter <donald.hunter@
tools/net/ynl: Implement nlattr array-nest decoding in ynl
Add support for the 'array-nest' attribute type that is used by several netlink-raw families.
Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://lore.kernel.org/r/20230825122756.7603-9-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
e46dd903 | 25-Aug-2023 |
Donald Hunter <donald.hunter@gmail.com> |
tools/net/ynl: Add support for netlink-raw families
Refactor the ynl code to encapsulate protocol specifics into NetlinkProtocol and GenlProtocol.
Signed-off-by: Donald Hunter <donald.hunter@gmail.
tools/net/ynl: Add support for netlink-raw families
Refactor the ynl code to encapsulate protocol specifics into NetlinkProtocol and GenlProtocol.
Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Link: https://lore.kernel.org/r/20230825122756.7603-8-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
fb0a06d4 | 25-Aug-2023 |
Donald Hunter <donald.hunter@gmail.com> |
tools/net/ynl: Fix extack parsing with fixed header genlmsg
Move decode_fixed_header into YnlFamily and add a _fixed_header_size method to allow extack decoding to skip the fixed header.
Signed-off
tools/net/ynl: Fix extack parsing with fixed header genlmsg
Move decode_fixed_header into YnlFamily and add a _fixed_header_size method to allow extack decoding to skip the fixed header.
Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://lore.kernel.org/r/20230825122756.7603-7-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
4c8c24e8 | 23-Aug-2023 |
Jakub Kicinski <kuba@kernel.org> |
tools: ynl-gen: support empty attribute lists
Differentiate between empty list and None for member lists. New families may want to create request responses with no attribute. If we treat those the s
tools: ynl-gen: support empty attribute lists
Differentiate between empty list and None for member lists. New families may want to create request responses with no attribute. If we treat those the same as None we end up rendering a full parsing policy in user space, instead of an empty one.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://lore.kernel.org/r/20230824003056.1436637-5-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
dc2ef94d | 23-Aug-2023 |
Jakub Kicinski <kuba@kernel.org> |
tools: ynl-gen: fix collecting global policy attrs
We look for attributes inside do.request, but there's another layer of nesting in the spec, look inside do.request.attributes.
This bug had no eff
tools: ynl-gen: fix collecting global policy attrs
We look for attributes inside do.request, but there's another layer of nesting in the spec, look inside do.request.attributes.
This bug had no effect as all global policies we generate (fou) seem to be full, anyway, and we treat full and empty the same.
Next patch will change the treatment of empty policies.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://lore.kernel.org/r/20230824003056.1436637-4-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
a149a3a1 | 23-Aug-2023 |
Jakub Kicinski <kuba@kernel.org> |
tools: ynl-gen: set length of binary fields
Remember to set the length field in the request setters.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://lore.kernel.org/r/20230824003
tools: ynl-gen: set length of binary fields
Remember to set the length field in the request setters.
Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Link: https://lore.kernel.org/r/20230824003056.1436637-3-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
fa8ba350 | 03-Aug-2023 |
Jiri Pirko <jiri@nvidia.com> |
ynl-gen-c.py: render netlink policies static for split ops
When policies are rendered for split ops, they are consumed in the same file. No need to expose them for user outside, make them static.
S
ynl-gen-c.py: render netlink policies static for split ops
When policies are rendered for split ops, they are consumed in the same file. No need to expose them for user outside, make them static.
Signed-off-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Link: https://lore.kernel.org/r/20230803111340.1074067-5-jiri@resnulli.us Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|