1 Star 0 Fork 50

杨枝甘露瑞纳冰/systemd

forked from src-anolis-os/systemd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0666-Do-not-fail-if-the-same-alt.-name-is-set-again.patch 1.11 KB
一键复制 编辑 原始数据 按行查看 历史
From 21c071fbd05d112ccd92b7a49e53bf8d38cdbd06 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Wed, 8 Dec 2021 09:49:24 +0100
Subject: [PATCH] Do not fail if the same alt. name is set again
This is a workaround for a kernel bug.
RHEL-only
Resolves: #2030027
---
src/udev/net/link-config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
index 5220f247f0..9046c5bd2a 100644
--- a/src/udev/net/link-config.c
+++ b/src/udev/net/link-config.c
@@ -526,7 +526,7 @@ int link_config_apply(link_config_ctx *ctx, link_config *config,
strv_uniq(altnames);
strv_sort(altnames);
r = rtnl_set_link_alternative_names(&ctx->rtnl, ifindex, altnames);
- if (r == -EOPNOTSUPP)
+ if (IN_SET(r, -EOPNOTSUPP, -EEXIST))
log_debug_errno(r, "Could not set AlternativeName= or apply AlternativeNamesPolicy= on %s, ignoring: %m", old_name);
else if (r < 0)
return log_warning_errno(r, "Could not set AlternativeName= or apply AlternativeNamesPolicy= on %s: %m", old_name);
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yummypeng/systemd.git
git@gitee.com:yummypeng/systemd.git
yummypeng
systemd
systemd
a8

搜索帮助