richardphibel / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
eb17d3
From 21c071fbd05d112ccd92b7a49e53bf8d38cdbd06 Mon Sep 17 00:00:00 2001
eb17d3
From: David Tardon <dtardon@redhat.com>
eb17d3
Date: Wed, 8 Dec 2021 09:49:24 +0100
eb17d3
Subject: [PATCH] Do not fail if the same alt. name is set again
eb17d3
eb17d3
This is a workaround for a kernel bug.
eb17d3
eb17d3
RHEL-only
eb17d3
eb17d3
Resolves: #2030027
eb17d3
---
eb17d3
 src/udev/net/link-config.c | 2 +-
eb17d3
 1 file changed, 1 insertion(+), 1 deletion(-)
eb17d3
eb17d3
diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
eb17d3
index 5220f247f0..9046c5bd2a 100644
eb17d3
--- a/src/udev/net/link-config.c
eb17d3
+++ b/src/udev/net/link-config.c
eb17d3
@@ -526,7 +526,7 @@ int link_config_apply(link_config_ctx *ctx, link_config *config,
eb17d3
         strv_uniq(altnames);
eb17d3
         strv_sort(altnames);
eb17d3
         r = rtnl_set_link_alternative_names(&ctx->rtnl, ifindex, altnames);
eb17d3
-        if (r == -EOPNOTSUPP)
eb17d3
+        if (IN_SET(r, -EOPNOTSUPP, -EEXIST))
eb17d3
                 log_debug_errno(r, "Could not set AlternativeName= or apply AlternativeNamesPolicy= on %s, ignoring: %m", old_name);
eb17d3
         else if (r < 0)
eb17d3
                 return log_warning_errno(r, "Could not set AlternativeName= or apply AlternativeNamesPolicy= on %s: %m", old_name);