summary refs log tree commit diff
path: root/src/core/dhcp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/dhcp')
-rw-r--r--src/core/dhcp/nm-dhcp-listener.c12
-rw-r--r--src/core/dhcp/nm-dhcp-manager.c11
2 files changed, 15 insertions, 8 deletions
diff --git a/src/core/dhcp/nm-dhcp-listener.c b/src/core/dhcp/nm-dhcp-listener.c
index 0854c1dc..05e428f8 100644
--- a/src/core/dhcp/nm-dhcp-listener.c
+++ b/src/core/dhcp/nm-dhcp-listener.c
@@ -27,21 +27,21 @@
 
 const NMDhcpClientFactory *const _nm_dhcp_manager_factories[6] = {
 
-/* the order here matters, as we will try the plugins in this order to find
- * the first available plugin. */
+    /* the order here matters, as we will try the plugins in this order to find
+     * the first available plugin. */
 
+    &_nm_dhcp_client_factory_internal,
 #if WITH_DHCPCANON
     &_nm_dhcp_client_factory_dhcpcanon,
 #endif
-#if WITH_DHCLIENT
-    &_nm_dhcp_client_factory_dhclient,
-#endif
 #if WITH_DHCPCD
     &_nm_dhcp_client_factory_dhcpcd,
 #endif
-    &_nm_dhcp_client_factory_internal,
     &_nm_dhcp_client_factory_systemd,
     &_nm_dhcp_client_factory_nettools,
+#if WITH_DHCLIENT
+    &_nm_dhcp_client_factory_dhclient,
+#endif
 };
 
 /*****************************************************************************/
diff --git a/src/core/dhcp/nm-dhcp-manager.c b/src/core/dhcp/nm-dhcp-manager.c
index cfff23f8..68bb327b 100644
--- a/src/core/dhcp/nm-dhcp-manager.c
+++ b/src/core/dhcp/nm-dhcp-manager.c
@@ -90,8 +90,15 @@ _client_factory_find_by_name(const char *name)
 static const NMDhcpClientFactory *
 _client_factory_available(const NMDhcpClientFactory *client_factory)
 {
-    if (client_factory && (!client_factory->get_path || client_factory->get_path()))
-        return client_factory;
+    if (client_factory) {
+        if (nm_streq(client_factory->name, "dhclient")) {
+            _LOGW(AF_UNSPEC,
+                  "attempting to used a deprecated DHCP client '%s' ",
+                  client_factory->name);
+        }
+        if (!client_factory->get_path || client_factory->get_path())
+            return client_factory;
+    }
     return NULL;
 }