]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: sort alternative names
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 17 Dec 2019 11:41:21 +0000 (20:41 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 17 Dec 2019 15:05:50 +0000 (00:05 +0900)
Kernel preserves the order of alternative names. So, for user
visibility, let's sort the alternative names.

src/udev/net/link-config.c

index 19cecf1895bb8b22109be796ef94d2ca2bf41d20..ad97a89447368063d239ec656ee44fc0f4549694 100644 (file)
@@ -503,6 +503,7 @@ int link_config_apply(link_config_ctx *ctx, link_config *config,
                 strv_remove(altnames, new_name);
         strv_remove(altnames, old_name);
         strv_uniq(altnames);
+        strv_sort(altnames);
 
         r = rtnl_set_link_alternative_names(&ctx->rtnl, ifindex, altnames);
         if (r == -EOPNOTSUPP)