tools: ynl: don't ignore errors in NLMSG_DONE messages
Subsystems (3)
Jakub Kicinski
maintainerPATCH 1/1 tools: ynl: don't ignore errors in NLMSG_DONE messages
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.
---
CC: [email protected]
CC: [email protected]
CC: [email protected]
--- tools/net/ynl/lib/ynl.py | 1 + 1 file changed, 1 insertion(+)
tools/net/ynl/lib/ynl.py +1 -0
@@ -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
Signature · 1 line
2.44.0
Quoted 6 lines · Jakub Kicinski
NLMSG_DONEcontains 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 <[email protected]>
Quoted 19 lines
---
CC: [email protected]
CC: [email protected]
CC: [email protected]--- tools/net/ynl/lib/ynl.py | 1 + 1 file changed, 1 insertion(+)tools/net/ynl/lib/ynl.py +1
-0@@ -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
This patch was applied to netdev/net.git (main) by Paolo Abeni <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <[email protected]>:
Quoted 8 lines · On Fri, 19 Apr 2024 19:08:26 -0700 you wrote:
NLMSG_DONEcontains 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 <[email protected]>[...]
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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html