File util-linux-lib-netlink-fix2.patch of Package util-linux
From 030303e4b93b65a5172a0c80f9f864b06f76cb81 Mon Sep 17 00:00:00 2001
From: Stanislav Brabec <sbrabec@suse.cz>
Date: Sun, 5 Oct 2025 02:53:17 +0200
Subject: [PATCH 4/6] netlink process_addr(): Ignore UL_NL_SOFT_ERROR
UL_NL_SOFT_ERROR can be issued if kernel sends unpaired RTM_DELADDR. It
should not happen, but it can happen due to race condition. And it happened
in some kernel versions. It is not reason to exit the processing loop.
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
---
lib/netlink.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/netlink.c b/lib/netlink.c
index f8ac2c4c8..3e58e17da 100644
--- a/lib/netlink.c
+++ b/lib/netlink.c
@@ -130,7 +130,9 @@ static int process_addr(struct ul_nl_data *nl, struct nlmsghdr *nh)
nl->addr.ifname = ifname;
else
{
- /* There can be race, we do not return error here */
+ /* There can be race, we do not return error here.
+ * It also happens on RTM_DELADDR, as interface name could
+ * disappear from kernel tables before we process it. */
/* FIXME I18N: *"unknown"* is too generic. Use context. */
/* TRANSLATORS: unknown network interface, maximum 15
* (IF_NAMESIZE-1) bytes */
@@ -289,7 +291,8 @@ int ul_nl_process(struct ul_nl_data *nl, bool async, bool loop)
ul_debugobj(nl,
"process_msg() returned %d",
rc));
- return rc;
+ if (rc != UL_NL_SOFT_ERROR)
+ return rc;
}
}
if (!loop)
--
2.48.1