diff --git a/backport-dcb-unblock-mnl_socket_recvfrom-if-not-message-recei.patch b/backport-dcb-unblock-mnl_socket_recvfrom-if-not-message-recei.patch new file mode 100644 index 0000000..a2ebe16 --- /dev/null +++ b/backport-dcb-unblock-mnl_socket_recvfrom-if-not-message-recei.patch @@ -0,0 +1,44 @@ +From 84c036972659ae9a98aac3cef983cc7dd8e14c53 Mon Sep 17 00:00:00 2001 +From: Junxin Chen +Date: Wed, 19 Oct 2022 09:20:08 +0800 +Subject: [PATCH] dcb: unblock mnl_socket_recvfrom if not message received + +Currently, the dcb command sinks to the kernel through the netlink +to obtain information. However, if the kernel fails to obtain infor- +mation or is not processed, the dcb command is suspended. + +For example, if we don't implement dcbnl_ops->ieee_getpfc in the +kernel, the command "dcb pfc show dev eth1" will be stuck and subsequent +commands cannot be executed. + +This patch adds the NLM_F_ACK flag to the netlink in mnlu_msg_prepare +to ensure that the kernel responds to user requests. + +After the problem is solved, the execution result is as follows: +$ dcb pfc show dev eth1 +Attribute not found: Success + +Fixes: 67033d1c1c8a ("Add skeleton of a new tool, dcb") +Signed-off-by: Junxin Chen +Signed-off-by: Stephen Hemminger +--- + dcb/dcb.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/dcb/dcb.c b/dcb/dcb.c +index 8d75ab0..391fd95 100644 +--- a/dcb/dcb.c ++++ b/dcb/dcb.c +@@ -156,7 +156,8 @@ static struct nlmsghdr *dcb_prepare(struct dcb *dcb, const char *dev, + }; + struct nlmsghdr *nlh; + +- nlh = mnlu_msg_prepare(dcb->buf, nlmsg_type, NLM_F_REQUEST, &dcbm, sizeof(dcbm)); ++ nlh = mnlu_msg_prepare(dcb->buf, nlmsg_type, NLM_F_REQUEST | NLM_F_ACK, ++ &dcbm, sizeof(dcbm)); + mnl_attr_put_strz(nlh, DCB_ATTR_IFNAME, dev); + return nlh; + } +-- +2.7.4 + diff --git a/iproute.spec b/iproute.spec index 7aea67a..c08f6be 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Name: iproute Version: 5.15.0 Epoch: 1 -Release: 22 +Release: 23 Summary: Linux network configuration utilities License: GPLv2+ and Public Domain URL: https://kernel.org/pub/linux/utils/net/iproute2/ @@ -73,6 +73,7 @@ Patch6055: backport-ctrl-Fix-fd-leak-in-ctrl_listen.patch Patch6056: backport-ss-fix-expired-time-format-of-timer.patch Patch6057: backport-route-filter-by-interface-on-multipath-routes.patch Patch6058: backport-lib-names-check-calloc-return-value-in-db_names_alloc.patch +Patch6059: backport-dcb-unblock-mnl_socket_recvfrom-if-not-message-recei.patch Patch9000: feature-iproute-add-support-for-ipvlan-l2e-mode.patch Patch9001: bugfix-iproute2-cancel-some-test-cases.patch @@ -154,6 +155,12 @@ install -m 0644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a %{_mandir}/* %changelog +* Mon Mar 24 2025 chenhao - 1:5.15.0-23 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:dcb: unblock mnl_socket_recvfrom if not message received + * Thu Feb 13 2025 xinghe - 1:5.15.0-22 - Type:bugfix - ID:NA