* [PATCH net] tools: ynl: don't ignore errors in NLMSG_DONE messages
@ 2024-04-20 2:08 Jakub Kicinski
2024-04-22 12:08 ` Donald Hunter
2024-04-23 13:50 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Jakub Kicinski @ 2024-04-20 2:08 UTC (permalink / raw)
To: davem; +Cc: netdev, edumazet, pabeni, Jakub Kicinski, donald.hunter, jiri,
sdf
NLMSG_DONE contains an error code, it has to be extracted.
Prior to this change all dumps will end in success,
and in case of failure the result is silently truncated.
Fixes: e4b48ed460d3 ("tools: ynl: add a completely generic client")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: donald.hunter@gmail.com
CC: jiri@resnulli.us
CC: sdf@google.com
---
tools/net/ynl/lib/ynl.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/net/ynl/lib/ynl.py b/tools/net/ynl/lib/ynl.py
index a67f7b6fef92..a9e4d588baf6 100644
--- a/tools/net/ynl/lib/ynl.py
+++ b/tools/net/ynl/lib/ynl.py
@@ -203,6 +203,7 @@ from .nlspec import SpecFamily
self.done = 1
extack_off = 20
elif self.nl_type == Netlink.NLMSG_DONE:
+ self.error = struct.unpack("i", self.raw[0:4])[0]
self.done = 1
extack_off = 4
--
2.44.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH net] tools: ynl: don't ignore errors in NLMSG_DONE messages
2024-04-20 2:08 [PATCH net] tools: ynl: don't ignore errors in NLMSG_DONE messages Jakub Kicinski
@ 2024-04-22 12:08 ` Donald Hunter
2024-04-23 13:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Donald Hunter @ 2024-04-22 12:08 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: davem, netdev, edumazet, pabeni, jiri, sdf
Jakub Kicinski <kuba@kernel.org> writes:
> NLMSG_DONE contains an error code, it has to be extracted.
> Prior to this change all dumps will end in success,
> and in case of failure the result is silently truncated.
>
> Fixes: e4b48ed460d3 ("tools: ynl: add a completely generic client")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
> ---
> CC: donald.hunter@gmail.com
> CC: jiri@resnulli.us
> CC: sdf@google.com
> ---
> tools/net/ynl/lib/ynl.py | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/net/ynl/lib/ynl.py b/tools/net/ynl/lib/ynl.py
> index a67f7b6fef92..a9e4d588baf6 100644
> --- a/tools/net/ynl/lib/ynl.py
> +++ b/tools/net/ynl/lib/ynl.py
> @@ -203,6 +203,7 @@ from .nlspec import SpecFamily
> self.done = 1
> extack_off = 20
> elif self.nl_type == Netlink.NLMSG_DONE:
> + self.error = struct.unpack("i", self.raw[0:4])[0]
> self.done = 1
> extack_off = 4
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH net] tools: ynl: don't ignore errors in NLMSG_DONE messages
2024-04-20 2:08 [PATCH net] tools: ynl: don't ignore errors in NLMSG_DONE messages Jakub Kicinski
2024-04-22 12:08 ` Donald Hunter
@ 2024-04-23 13:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-04-23 13:50 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: davem, netdev, edumazet, pabeni, donald.hunter, jiri, sdf
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Fri, 19 Apr 2024 19:08:26 -0700 you wrote:
> NLMSG_DONE contains an error code, it has to be extracted.
> Prior to this change all dumps will end in success,
> and in case of failure the result is silently truncated.
>
> Fixes: e4b48ed460d3 ("tools: ynl: add a completely generic client")
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
>
> [...]
Here is the summary with links:
- [net] tools: ynl: don't ignore errors in NLMSG_DONE messages
https://git.kernel.org/netdev/net/c/a44f2eb106a4
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-23 13:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-20 2:08 [PATCH net] tools: ynl: don't ignore errors in NLMSG_DONE messages Jakub Kicinski
2024-04-22 12:08 ` Donald Hunter
2024-04-23 13:50 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).