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