summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco Giudici <fgiudici@redhat.com>2018-06-18 16:37:31 +0200
committerFrancesco Giudici <fgiudici@redhat.com>2018-06-20 10:43:51 +0200
commit08116409f3f9bbb44115aa53fe27d9624731fa73 (patch)
tree250d53af7d3b7ac2219a5386a659683c70773c61
parent0a662a3620d3bccb9efc9b286b2e4afc052bc63b (diff)
downloadNetworkManager-fg/duid_enforce_as_bool.tar.gz
dhcp: look for DUID in both private and global DHCP client lease filesfg/duid_enforce_as_bool
Option to check just in NM private dhcp client specific lease files has been dropped: either get DUID from specific DHCP plugin or just use the provided one. This reverts commit f054c3fcaadb39c6597d9d9e4ed94b5d4fc29508.
-rw-r--r--src/dhcp/nm-dhcp-client.c4
-rw-r--r--src/dhcp/nm-dhcp-client.h4
-rw-r--r--src/dhcp/nm-dhcp-dhclient.c4
3 files changed, 5 insertions, 7 deletions
diff --git a/src/dhcp/nm-dhcp-client.c b/src/dhcp/nm-dhcp-client.c
index 7742448059..360bd36767 100644
--- a/src/dhcp/nm-dhcp-client.c
+++ b/src/dhcp/nm-dhcp-client.c
@@ -513,7 +513,7 @@ nm_dhcp_client_start_ip4 (NMDhcpClient *self,
}
static GBytes *
-get_duid (NMDhcpClient *self, gboolean global)
+get_duid (NMDhcpClient *self)
{
return NULL;
}
@@ -542,7 +542,7 @@ nm_dhcp_client_start_ip6 (NMDhcpClient *self,
nm_assert (client_id);
if (!enforce_duid)
- priv->duid = NM_DHCP_CLIENT_GET_CLASS (self)->get_duid (self, TRUE);
+ priv->duid = NM_DHCP_CLIENT_GET_CLASS (self)->get_duid (self);
if (!priv->duid)
priv->duid = g_bytes_ref (client_id);
diff --git a/src/dhcp/nm-dhcp-client.h b/src/dhcp/nm-dhcp-client.h
index 8f51d7cea8..f3d0b7d184 100644
--- a/src/dhcp/nm-dhcp-client.h
+++ b/src/dhcp/nm-dhcp-client.h
@@ -96,15 +96,13 @@ typedef struct {
/**
* get_duid:
* @self: the #NMDhcpClient
- * @global: if set to #true, the duid should be searched also in the
- * DHCP client's system-wide persistent configuration.
*
* Attempts to find an existing DHCPv6 DUID for this client in the DHCP
* client's persistent configuration. Returned DUID should be the binary
* representation of the DUID. If no DUID is found, %NULL should be
* returned.
*/
- GBytes *(*get_duid) (NMDhcpClient *self, gboolean global);
+ GBytes *(*get_duid) (NMDhcpClient *self);
/* Signals */
void (*state_changed) (NMDhcpClient *self,
diff --git a/src/dhcp/nm-dhcp-dhclient.c b/src/dhcp/nm-dhcp-dhclient.c
index 43746dd394..3bd14ebe89 100644
--- a/src/dhcp/nm-dhcp-dhclient.c
+++ b/src/dhcp/nm-dhcp-dhclient.c
@@ -582,7 +582,7 @@ state_changed (NMDhcpClient *client,
}
static GBytes *
-get_duid (NMDhcpClient *client, gboolean global)
+get_duid (NMDhcpClient *client)
{
NMDhcpDhclient *self = NM_DHCP_DHCLIENT (client);
NMDhcpDhclientPrivate *priv = NM_DHCP_DHCLIENT_GET_PRIVATE (self);
@@ -607,7 +607,7 @@ get_duid (NMDhcpClient *client, gboolean global)
g_free (leasefile);
}
- if (!duid && global) {
+ if (!duid) {
/* Otherwise read the default machine-wide DUID */
_LOGD ("looking for default DUID in '%s'", priv->def_leasefile);
duid = nm_dhcp_dhclient_read_duid (priv->def_leasefile, &error);