mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 20:40:21 +01:00
dhcp: minor refactoring to switch default IPv4 DHCP plugin to "nettools" with one-line change
Minor refactoring so that there is only a one-line change necessary to flip the implementation of the "internal" DHCP plugin for IPv4 from "systemd" to "nettools". We don't do that yet, because there are still some issues (e.g. the lease is not persisted for nettools plugin). Eventually we want to switch, so prepare the code to be almost there.
This commit is contained in:
parent
b53e261427
commit
75503c8554
3 changed files with 4 additions and 2 deletions
|
|
@ -214,6 +214,8 @@ typedef struct {
|
|||
bool experimental:1;
|
||||
} NMDhcpClientFactory;
|
||||
|
||||
GType nm_dhcp_nettools_get_type (void);
|
||||
|
||||
extern const NMDhcpClientFactory _nm_dhcp_client_factory_dhcpcanon;
|
||||
extern const NMDhcpClientFactory _nm_dhcp_client_factory_dhclient;
|
||||
extern const NMDhcpClientFactory _nm_dhcp_client_factory_dhcpcd;
|
||||
|
|
|
|||
|
|
@ -55,8 +55,6 @@
|
|||
typedef struct _NMDhcpNettools NMDhcpNettools;
|
||||
typedef struct _NMDhcpNettoolsClass NMDhcpNettoolsClass;
|
||||
|
||||
static GType nm_dhcp_nettools_get_type (void);
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
typedef struct {
|
||||
|
|
|
|||
|
|
@ -1186,6 +1186,8 @@ _get_type_per_addr_family (int addr_family)
|
|||
{
|
||||
nm_assert_addr_family (addr_family);
|
||||
|
||||
if (FALSE && addr_family == AF_INET)
|
||||
return nm_dhcp_nettools_get_type ();
|
||||
return nm_dhcp_systemd_get_type ();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue