From: Stanislav Brabec Date: Sun, 5 Oct 2025 00:53:17 +0000 (+0200) Subject: netlink process_addr(): Ignore UL_NL_SOFT_ERROR X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=030303e4b93b65a5172a0c80f9f864b06f76cb81;p=thirdparty%2Futil-linux.git 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 --- 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)