Skip to contentSkip to conversation

netlink: display information from missing type extack

PATCH Applied Stephen Hemminger 2 participants 2 messages Feb 10, 2024 – Feb 18, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netlink: display information from missing type extack

The kernel will now send missing type information in error response. Print it if present.

---
 lib/libnetlink.c | 4 ++++
 1 file changed, 4 insertions(+)
lib/libnetlink.c +4 -0
index 016482294276..e2b284e6998c 100644
@@ -111,6 +111,10 @@ int nl_dump_ext_ack(const struct nlmsghdr *nlh, nl_ext_ack_fn_t errfn)
 			err_nlh = &err->msg;
 	}
 
+	if (tb[NLMSGERR_ATTR_MISS_TYPE])
+		fprintf(stderr, "Missing required attribute type %u\n",
+			mnl_attr_get_u32(tb[NLMSGERR_ATTR_MISS_TYPE]));
+
 	if (errfn)
 		return errfn(msg, off, err_nlh);
 
Signature · 1 line
2.43.0
#1 lore raw
This patch was applied to iproute2/iproute2-next.git (main) by David Ahern <[email protected]>:

Hello:

This patch was applied to iproute2/iproute2-next.git (main) by David Ahern <[email protected]>:

Quoted 7 lines · On Sat, 10 Feb 2024 09:32:31 -0800 you wrote:

The kernel will now send missing type information in error response. Print it if present.

---
 lib/libnetlink.c | 4 ++++
 1 file changed, 4 insertions(+)

Here is the summary with links:
- [iproute2-next] netlink: display information from missing type extack

    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=7e646c80d757

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html