teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame SOURCES/0720-udev-sort-alternative-names.patch

be0c12
From f5d149095f95704fe7660069a493c0329ddbb5aa Mon Sep 17 00:00:00 2001
be0c12
From: Yu Watanabe <watanabe.yu+github@gmail.com>
be0c12
Date: Tue, 17 Dec 2019 20:41:21 +0900
be0c12
Subject: [PATCH] udev: sort alternative names
be0c12
be0c12
Kernel preserves the order of alternative names. So, for user
be0c12
visibility, let's sort the alternative names.
be0c12
be0c12
(cherry picked from commit 4d016e965b13883cccc963a34a1299a0c4f900ca)
be0c12
be0c12
Related: #2005008
be0c12
---
be0c12
 src/udev/net/link-config.c | 1 +
be0c12
 1 file changed, 1 insertion(+)
be0c12
be0c12
diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
be0c12
index 6ceb4c698e..8bd374d352 100644
be0c12
--- a/src/udev/net/link-config.c
be0c12
+++ b/src/udev/net/link-config.c
be0c12
@@ -515,6 +515,7 @@ int link_config_apply(link_config_ctx *ctx, link_config *config,
be0c12
                 strv_remove(altnames, new_name);
be0c12
         strv_remove(altnames, old_name);
be0c12
         strv_uniq(altnames);
be0c12
+        strv_sort(altnames);
be0c12
 
be0c12
         r = rtnl_set_link_alternative_names(&ctx->rtnl, ifindex, altnames);
be0c12
         if (r == -EOPNOTSUPP)