From 4d016e965b13883cccc963a34a1299a0c4f900ca Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 17 Dec 2019 20:41:21 +0900 Subject: [PATCH] udev: sort alternative names Kernel preserves the order of alternative names. So, for user visibility, let's sort the alternative names. --- src/udev/net/link-config.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c index 19cecf1895..ad97a89447 100644 --- a/src/udev/net/link-config.c +++ b/src/udev/net/link-config.c @@ -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)