dhcp: merge branch 'fg/persistent_dhcp_rh1350830'
https://bugzilla.redhat.com/show_bug.cgi?id=1350830
This commit is contained in:
@@ -5364,6 +5364,19 @@ static const NMMetaPropertyInfo *const property_infos_IP4_CONFIG[] = {
|
|||||||
),
|
),
|
||||||
PROPERTY_INFO (NM_SETTING_IP_CONFIG_DHCP_TIMEOUT, DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_TIMEOUT,
|
PROPERTY_INFO (NM_SETTING_IP_CONFIG_DHCP_TIMEOUT, DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_TIMEOUT,
|
||||||
.property_type = &_pt_gobject_int,
|
.property_type = &_pt_gobject_int,
|
||||||
|
.property_typ_data = DEFINE_PROPERTY_TYP_DATA_SUBTYPE (gobject_int,
|
||||||
|
.value_infos = INT_VALUE_INFOS (
|
||||||
|
{
|
||||||
|
.value = 0,
|
||||||
|
.nick = "default",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.value = G_MAXINT32,
|
||||||
|
.nick = "infinity",
|
||||||
|
}
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
),
|
),
|
||||||
PROPERTY_INFO (NM_SETTING_IP_CONFIG_DHCP_SEND_HOSTNAME, DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_SEND_HOSTNAME,
|
PROPERTY_INFO (NM_SETTING_IP_CONFIG_DHCP_SEND_HOSTNAME, DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_SEND_HOSTNAME,
|
||||||
.property_type = &_pt_gobject_bool,
|
.property_type = &_pt_gobject_bool,
|
||||||
|
@@ -404,6 +404,10 @@ nm_dhcp_client_start_timeout (NMDhcpClient *self)
|
|||||||
|
|
||||||
/* Set up a timeout on the transaction to kill it after the timeout */
|
/* Set up a timeout on the transaction to kill it after the timeout */
|
||||||
g_assert (priv->timeout_id == 0);
|
g_assert (priv->timeout_id == 0);
|
||||||
|
|
||||||
|
if (priv->timeout == NM_DHCP_TIMEOUT_INFINITY)
|
||||||
|
return;
|
||||||
|
|
||||||
priv->timeout_id = g_timeout_add_seconds (priv->timeout,
|
priv->timeout_id = g_timeout_add_seconds (priv->timeout,
|
||||||
transaction_timeout,
|
transaction_timeout,
|
||||||
self);
|
self);
|
||||||
@@ -441,7 +445,10 @@ nm_dhcp_client_start_ip4 (NMDhcpClient *self,
|
|||||||
g_return_val_if_fail (priv->addr_family == AF_INET, FALSE);
|
g_return_val_if_fail (priv->addr_family == AF_INET, FALSE);
|
||||||
g_return_val_if_fail (priv->uuid != NULL, FALSE);
|
g_return_val_if_fail (priv->uuid != NULL, FALSE);
|
||||||
|
|
||||||
_LOGI ("activation: beginning transaction (timeout in %u seconds)", (guint) priv->timeout);
|
if (priv->timeout == NM_DHCP_TIMEOUT_INFINITY)
|
||||||
|
_LOGI ("activation: beginning transaction (no timeout)");
|
||||||
|
else
|
||||||
|
_LOGI ("activation: beginning transaction (timeout in %u seconds)", (guint) priv->timeout);
|
||||||
|
|
||||||
if (dhcp_client_id)
|
if (dhcp_client_id)
|
||||||
tmp = nm_dhcp_utils_client_id_string_to_bytes (dhcp_client_id);
|
tmp = nm_dhcp_utils_client_id_string_to_bytes (dhcp_client_id);
|
||||||
@@ -556,8 +563,10 @@ nm_dhcp_client_start_ip6 (NMDhcpClient *self,
|
|||||||
|
|
||||||
priv->info_only = info_only;
|
priv->info_only = info_only;
|
||||||
|
|
||||||
_LOGI ("activation: beginning transaction (timeout in %u seconds)",
|
if (priv->timeout == NM_DHCP_TIMEOUT_INFINITY)
|
||||||
(guint) priv->timeout);
|
_LOGI ("activation: beginning transaction (no timeout)");
|
||||||
|
else
|
||||||
|
_LOGI ("activation: beginning transaction (timeout in %u seconds)", (guint) priv->timeout);
|
||||||
|
|
||||||
return NM_DHCP_CLIENT_GET_CLASS (self)->ip6_start (self,
|
return NM_DHCP_CLIENT_GET_CLASS (self)->ip6_start (self,
|
||||||
dhcp_anycast_addr,
|
dhcp_anycast_addr,
|
||||||
|
@@ -25,6 +25,7 @@
|
|||||||
#include "nm-ip6-config.h"
|
#include "nm-ip6-config.h"
|
||||||
|
|
||||||
#define NM_DHCP_TIMEOUT_DEFAULT ((guint32) 45) /* default DHCP timeout, in seconds */
|
#define NM_DHCP_TIMEOUT_DEFAULT ((guint32) 45) /* default DHCP timeout, in seconds */
|
||||||
|
#define NM_DHCP_TIMEOUT_INFINITY G_MAXINT32
|
||||||
|
|
||||||
#define NM_TYPE_DHCP_CLIENT (nm_dhcp_client_get_type ())
|
#define NM_TYPE_DHCP_CLIENT (nm_dhcp_client_get_type ())
|
||||||
#define NM_DHCP_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DHCP_CLIENT, NMDhcpClient))
|
#define NM_DHCP_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DHCP_CLIENT, NMDhcpClient))
|
||||||
@@ -45,6 +46,7 @@
|
|||||||
#define NM_DHCP_CLIENT_SIGNAL_STATE_CHANGED "state-changed"
|
#define NM_DHCP_CLIENT_SIGNAL_STATE_CHANGED "state-changed"
|
||||||
#define NM_DHCP_CLIENT_SIGNAL_PREFIX_DELEGATED "prefix-delegated"
|
#define NM_DHCP_CLIENT_SIGNAL_PREFIX_DELEGATED "prefix-delegated"
|
||||||
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
NM_DHCP_STATE_UNKNOWN = 0,
|
NM_DHCP_STATE_UNKNOWN = 0,
|
||||||
NM_DHCP_STATE_BOUND, /* new lease or lease changed */
|
NM_DHCP_STATE_BOUND, /* new lease or lease changed */
|
||||||
|
Reference in New Issue
Block a user