summaryrefslogtreecommitdiff
path: root/src/udev/net
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-08-12 13:15:11 +0200
committerTom Gundersen <teg@jklm.no>2014-08-12 20:42:59 +0200
commit68ba38770640413b4fa06773447666eb88a38d4c (patch)
tree3dc1312e7d92e4afd54a674681820947fa619376 /src/udev/net
parent464cf22f17e0cf2d8bfa6d72b5e7a662d634f149 (diff)
udev: link-config - fix naming policy
Don't exit the name-finding loop when the 'kernel' policy is detected. We should still find a fallback name if possible in the (very likely) case that no kernel name is set at all.
Diffstat (limited to 'src/udev/net')
-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 5b94e48825..4ff20e6d10 100644
--- a/src/udev/net/link-config.c
+++ b/src/udev/net/link-config.c
@@ -382,8 +382,8 @@ int link_config_apply(link_config_ctx *ctx, link_config *config,
if (ctx->enable_name_policy && config->name_policy) {
NamePolicy *policy;
- for (policy = config->name_policy; !respect_predictable && !new_name &&
- *policy != _NAMEPOLICY_INVALID; policy++) {
+ for (policy = config->name_policy;
+ !new_name && *policy != _NAMEPOLICY_INVALID; policy++) {
switch (*policy) {
case NAMEPOLICY_KERNEL:
respect_predictable = true;