summaryrefslogtreecommitdiff
path: root/src/udev
diff options
context:
space:
mode:
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/net/link-config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
index c2881d6b41..64ff00dc0d 100644
--- a/src/udev/net/link-config.c
+++ b/src/udev/net/link-config.c
@@ -424,8 +424,6 @@ int link_config_apply(link_config_ctx *ctx, link_config *config,
} else
new_name = NULL;
- *name = new_name;
-
switch (config->mac_policy) {
case MACPOLICY_PERSISTENT:
if (mac_is_random(device)) {
@@ -459,6 +457,8 @@ int link_config_apply(link_config_ctx *ctx, link_config *config,
return r;
}
+ *name = new_name;
+
return 0;
}