diff --git a/src/parse.c b/src/parse.c index 6cc8c5701..db9c8d4fd 100644 --- a/src/parse.c +++ b/src/parse.c @@ -3376,11 +3376,6 @@ handle_network_type(NetplanParser* npp, yaml_node_t* node, const char* key_prefi case NETPLAN_DEF_TYPE_NM: g_debug("netplan: %s: handling NetworkManager passthrough device, settings are not fully supported.", npp->current.netdef->id); handlers = ethernet_def_handlers; - if (npp->current.netdef->backend != NETPLAN_BACKEND_NM) { - g_debug("nm-device: %s: the renderer for nm-devices must be NetworkManager, it will be used instead of the defined one.", - npp->current.netdef->id); - npp->current.netdef->backend = NETPLAN_BACKEND_NM; - } break; default: g_assert_not_reached(); // LCOV_EXCL_LINE } @@ -3409,6 +3404,12 @@ handle_network_type(NetplanParser* npp, yaml_node_t* node, const char* key_prefi } } + if (npp->current.netdef->type == NETPLAN_DEF_TYPE_NM && npp->current.netdef->backend != NETPLAN_BACKEND_NM) { + g_debug("nm-device: %s: the renderer for nm-devices must be NetworkManager, it will be used instead of the defined one.", + npp->current.netdef->id); + npp->current.netdef->backend = NETPLAN_BACKEND_NM; + } + /* Postprocessing */ /* Implicit VXLAN settings, which can be deduced from parsed data. */ if (npp->current.netdef->type == NETPLAN_DEF_TYPE_TUNNEL &&