mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 17:00:08 +01:00
all: add a new ipv{4,6}.required-timeout property
Add a new property to specify the minimum time interval in
milliseconds for which dynamic IP configuration should be tried before
the connection succeeds.
This property is useful for example if both IPv4 and IPv6 are enabled
and are allowed to fail. Normally the connection succeeds as soon as
one of the two address families completes; by setting a required
timeout for e.g. IPv4, one can ensure that even if IP6 succeeds
earlier than IPv4, NetworkManager waits some time for IPv4 before the
connection becomes active.
(cherry picked from commit cb5960cef7)
This commit is contained in:
parent
f2d9f4bf66
commit
08ce20481c
13 changed files with 1061 additions and 665 deletions
|
|
@ -1895,6 +1895,8 @@ make_ip4_setting(shvarFile *ifcfg,
|
||||||
svGetValueBoolean(ifcfg, "DHCP_SEND_HOSTNAME", TRUE),
|
svGetValueBoolean(ifcfg, "DHCP_SEND_HOSTNAME", TRUE),
|
||||||
NM_SETTING_IP_CONFIG_DHCP_TIMEOUT,
|
NM_SETTING_IP_CONFIG_DHCP_TIMEOUT,
|
||||||
(int) svGetValueInt64(ifcfg, "IPV4_DHCP_TIMEOUT", 10, 0, G_MAXINT32, 0),
|
(int) svGetValueInt64(ifcfg, "IPV4_DHCP_TIMEOUT", 10, 0, G_MAXINT32, 0),
|
||||||
|
NM_SETTING_IP_CONFIG_REQUIRED_TIMEOUT,
|
||||||
|
(int) svGetValueInt64(ifcfg, "IPV4_REQUIRED_TIMEOUT", 10, 0, G_MAXINT32, -1),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
nm_clear_g_free(&value);
|
nm_clear_g_free(&value);
|
||||||
|
|
@ -2403,6 +2405,8 @@ make_ip6_setting(shvarFile *ifcfg, shvarFile *network_ifcfg, gboolean routes_rea
|
||||||
svGetValueBoolean(ifcfg, "DHCPV6_SEND_HOSTNAME", TRUE),
|
svGetValueBoolean(ifcfg, "DHCPV6_SEND_HOSTNAME", TRUE),
|
||||||
NM_SETTING_IP_CONFIG_DHCP_TIMEOUT,
|
NM_SETTING_IP_CONFIG_DHCP_TIMEOUT,
|
||||||
(int) svGetValueInt64(ifcfg, "IPV6_DHCP_TIMEOUT", 10, 0, G_MAXINT32, 0),
|
(int) svGetValueInt64(ifcfg, "IPV6_DHCP_TIMEOUT", 10, 0, G_MAXINT32, 0),
|
||||||
|
NM_SETTING_IP_CONFIG_REQUIRED_TIMEOUT,
|
||||||
|
(int) svGetValueInt64(ifcfg, "IPV6_REQUIRED_TIMEOUT", 10, 0, G_MAXINT32, -1),
|
||||||
NM_SETTING_IP6_CONFIG_RA_TIMEOUT,
|
NM_SETTING_IP6_CONFIG_RA_TIMEOUT,
|
||||||
(int) svGetValueInt64(ifcfg, "IPV6_RA_TIMEOUT", 10, 0, G_MAXINT32, 0),
|
(int) svGetValueInt64(ifcfg, "IPV6_RA_TIMEOUT", 10, 0, G_MAXINT32, 0),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
|
||||||
|
|
@ -958,6 +958,7 @@ const NMSIfcfgKeyTypeInfo nms_ifcfg_well_known_keys[] = {
|
||||||
_KEY_TYPE("IPV4_DHCP_TIMEOUT", NMS_IFCFG_KEY_TYPE_IS_PLAIN),
|
_KEY_TYPE("IPV4_DHCP_TIMEOUT", NMS_IFCFG_KEY_TYPE_IS_PLAIN),
|
||||||
_KEY_TYPE("IPV4_DNS_PRIORITY", NMS_IFCFG_KEY_TYPE_IS_PLAIN),
|
_KEY_TYPE("IPV4_DNS_PRIORITY", NMS_IFCFG_KEY_TYPE_IS_PLAIN),
|
||||||
_KEY_TYPE("IPV4_FAILURE_FATAL", NMS_IFCFG_KEY_TYPE_IS_PLAIN),
|
_KEY_TYPE("IPV4_FAILURE_FATAL", NMS_IFCFG_KEY_TYPE_IS_PLAIN),
|
||||||
|
_KEY_TYPE("IPV4_REQUIRED_TIMEOUT", NMS_IFCFG_KEY_TYPE_IS_PLAIN),
|
||||||
_KEY_TYPE("IPV4_ROUTE_METRIC", NMS_IFCFG_KEY_TYPE_IS_PLAIN),
|
_KEY_TYPE("IPV4_ROUTE_METRIC", NMS_IFCFG_KEY_TYPE_IS_PLAIN),
|
||||||
_KEY_TYPE("IPV4_ROUTE_TABLE", NMS_IFCFG_KEY_TYPE_IS_PLAIN),
|
_KEY_TYPE("IPV4_ROUTE_TABLE", NMS_IFCFG_KEY_TYPE_IS_PLAIN),
|
||||||
_KEY_TYPE("IPV6ADDR", NMS_IFCFG_KEY_TYPE_IS_PLAIN),
|
_KEY_TYPE("IPV6ADDR", NMS_IFCFG_KEY_TYPE_IS_PLAIN),
|
||||||
|
|
@ -980,6 +981,7 @@ const NMSIfcfgKeyTypeInfo nms_ifcfg_well_known_keys[] = {
|
||||||
_KEY_TYPE("IPV6_PRIVACY", NMS_IFCFG_KEY_TYPE_IS_PLAIN),
|
_KEY_TYPE("IPV6_PRIVACY", NMS_IFCFG_KEY_TYPE_IS_PLAIN),
|
||||||
_KEY_TYPE("IPV6_PRIVACY_PREFER_PUBLIC_IP", NMS_IFCFG_KEY_TYPE_IS_PLAIN),
|
_KEY_TYPE("IPV6_PRIVACY_PREFER_PUBLIC_IP", NMS_IFCFG_KEY_TYPE_IS_PLAIN),
|
||||||
_KEY_TYPE("IPV6_RA_TIMEOUT", NMS_IFCFG_KEY_TYPE_IS_PLAIN),
|
_KEY_TYPE("IPV6_RA_TIMEOUT", NMS_IFCFG_KEY_TYPE_IS_PLAIN),
|
||||||
|
_KEY_TYPE("IPV6_REQUIRED_TIMEOUT", NMS_IFCFG_KEY_TYPE_IS_PLAIN),
|
||||||
_KEY_TYPE("IPV6_RES_OPTIONS", NMS_IFCFG_KEY_TYPE_IS_PLAIN),
|
_KEY_TYPE("IPV6_RES_OPTIONS", NMS_IFCFG_KEY_TYPE_IS_PLAIN),
|
||||||
_KEY_TYPE("IPV6_ROUTE_METRIC", NMS_IFCFG_KEY_TYPE_IS_PLAIN),
|
_KEY_TYPE("IPV6_ROUTE_METRIC", NMS_IFCFG_KEY_TYPE_IS_PLAIN),
|
||||||
_KEY_TYPE("IPV6_ROUTE_TABLE", NMS_IFCFG_KEY_TYPE_IS_PLAIN),
|
_KEY_TYPE("IPV6_ROUTE_TABLE", NMS_IFCFG_KEY_TYPE_IS_PLAIN),
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ typedef struct {
|
||||||
NMSIfcfgKeyTypeFlags key_flags;
|
NMSIfcfgKeyTypeFlags key_flags;
|
||||||
} NMSIfcfgKeyTypeInfo;
|
} NMSIfcfgKeyTypeInfo;
|
||||||
|
|
||||||
extern const NMSIfcfgKeyTypeInfo nms_ifcfg_well_known_keys[249];
|
extern const NMSIfcfgKeyTypeInfo nms_ifcfg_well_known_keys[251];
|
||||||
|
|
||||||
const NMSIfcfgKeyTypeInfo *nms_ifcfg_well_known_key_find_info(const char *key, gssize *out_idx);
|
const NMSIfcfgKeyTypeInfo *nms_ifcfg_well_known_key_find_info(const char *key, gssize *out_idx);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2840,6 +2840,9 @@ write_ip4_setting(NMConnection *connection,
|
||||||
timeout = nm_setting_ip_config_get_dhcp_timeout(s_ip4);
|
timeout = nm_setting_ip_config_get_dhcp_timeout(s_ip4);
|
||||||
svSetValueInt64_cond(ifcfg, "IPV4_DHCP_TIMEOUT", timeout != 0, timeout);
|
svSetValueInt64_cond(ifcfg, "IPV4_DHCP_TIMEOUT", timeout != 0, timeout);
|
||||||
|
|
||||||
|
timeout = nm_setting_ip_config_get_required_timeout(s_ip4);
|
||||||
|
svSetValueInt64_cond(ifcfg, "IPV4_REQUIRED_TIMEOUT", timeout != -1, timeout);
|
||||||
|
|
||||||
svSetValueBoolean(ifcfg, "IPV4_FAILURE_FATAL", !nm_setting_ip_config_get_may_fail(s_ip4));
|
svSetValueBoolean(ifcfg, "IPV4_FAILURE_FATAL", !nm_setting_ip_config_get_may_fail(s_ip4));
|
||||||
|
|
||||||
route_metric = nm_setting_ip_config_get_route_metric(s_ip4);
|
route_metric = nm_setting_ip_config_get_route_metric(s_ip4);
|
||||||
|
|
@ -3037,6 +3040,9 @@ write_ip6_setting(NMConnection *connection,
|
||||||
timeout = nm_setting_ip_config_get_dhcp_timeout(s_ip6);
|
timeout = nm_setting_ip_config_get_dhcp_timeout(s_ip6);
|
||||||
svSetValueInt64_cond(ifcfg, "IPV6_DHCP_TIMEOUT", timeout != 0, timeout);
|
svSetValueInt64_cond(ifcfg, "IPV6_DHCP_TIMEOUT", timeout != 0, timeout);
|
||||||
|
|
||||||
|
timeout = nm_setting_ip_config_get_required_timeout(s_ip6);
|
||||||
|
svSetValueInt64_cond(ifcfg, "IPV6_REQUIRED_TIMEOUT", timeout != -1, timeout);
|
||||||
|
|
||||||
flags = nm_setting_ip_config_get_dhcp_hostname_flags(s_ip6);
|
flags = nm_setting_ip_config_get_dhcp_hostname_flags(s_ip6);
|
||||||
svSetValueInt64_cond(ifcfg,
|
svSetValueInt64_cond(ifcfg,
|
||||||
"DHCPV6_HOSTNAME_FLAGS",
|
"DHCPV6_HOSTNAME_FLAGS",
|
||||||
|
|
|
||||||
|
|
@ -1793,3 +1793,7 @@ global:
|
||||||
nm_setting_match_new;
|
nm_setting_match_new;
|
||||||
nm_setting_wired_get_accept_all_mac_addresses;
|
nm_setting_wired_get_accept_all_mac_addresses;
|
||||||
} libnm_1_30_0;
|
} libnm_1_30_0;
|
||||||
|
|
||||||
|
libnm_1_32_4 {
|
||||||
|
nm_setting_ip_config_get_required_timeout;
|
||||||
|
} libnm_1_32_0;
|
||||||
|
|
|
||||||
|
|
@ -3905,6 +3905,7 @@ NM_GOBJECT_PROPERTIES_DEFINE(NMSettingIPConfig,
|
||||||
PROP_MAY_FAIL,
|
PROP_MAY_FAIL,
|
||||||
PROP_DAD_TIMEOUT,
|
PROP_DAD_TIMEOUT,
|
||||||
PROP_DHCP_TIMEOUT,
|
PROP_DHCP_TIMEOUT,
|
||||||
|
PROP_REQUIRED_TIMEOUT,
|
||||||
PROP_DHCP_IAID,
|
PROP_DHCP_IAID,
|
||||||
PROP_DHCP_REJECT_SERVERS, );
|
PROP_DHCP_REJECT_SERVERS, );
|
||||||
|
|
||||||
|
|
@ -3925,6 +3926,7 @@ typedef struct {
|
||||||
int dns_priority;
|
int dns_priority;
|
||||||
int dad_timeout;
|
int dad_timeout;
|
||||||
int dhcp_timeout;
|
int dhcp_timeout;
|
||||||
|
int required_timeout;
|
||||||
guint32 route_table;
|
guint32 route_table;
|
||||||
bool ignore_auto_routes : 1;
|
bool ignore_auto_routes : 1;
|
||||||
bool ignore_auto_dns : 1;
|
bool ignore_auto_dns : 1;
|
||||||
|
|
@ -5205,6 +5207,25 @@ nm_setting_ip_config_get_dhcp_timeout(NMSettingIPConfig *setting)
|
||||||
return NM_SETTING_IP_CONFIG_GET_PRIVATE(setting)->dhcp_timeout;
|
return NM_SETTING_IP_CONFIG_GET_PRIVATE(setting)->dhcp_timeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* nm_setting_ip_config_get_required_timeout:
|
||||||
|
* @setting: the #NMSettingIPConfig
|
||||||
|
*
|
||||||
|
* Returns the value contained in the #NMSettingIPConfig:required-timeout
|
||||||
|
* property.
|
||||||
|
*
|
||||||
|
* Returns: the required timeout for the address family
|
||||||
|
*
|
||||||
|
* Since: 1.34, 1.32.4
|
||||||
|
**/
|
||||||
|
int
|
||||||
|
nm_setting_ip_config_get_required_timeout(NMSettingIPConfig *setting)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail(NM_IS_SETTING_IP_CONFIG(setting), -1);
|
||||||
|
|
||||||
|
return NM_SETTING_IP_CONFIG_GET_PRIVATE(setting)->required_timeout;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nm_setting_ip_config_get_dhcp_iaid:
|
* nm_setting_ip_config_get_dhcp_iaid:
|
||||||
* @setting: the #NMSettingIPConfig
|
* @setting: the #NMSettingIPConfig
|
||||||
|
|
@ -5908,6 +5929,9 @@ get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
|
||||||
case PROP_DHCP_TIMEOUT:
|
case PROP_DHCP_TIMEOUT:
|
||||||
g_value_set_int(value, nm_setting_ip_config_get_dhcp_timeout(setting));
|
g_value_set_int(value, nm_setting_ip_config_get_dhcp_timeout(setting));
|
||||||
break;
|
break;
|
||||||
|
case PROP_REQUIRED_TIMEOUT:
|
||||||
|
g_value_set_int(value, nm_setting_ip_config_get_required_timeout(setting));
|
||||||
|
break;
|
||||||
case PROP_DHCP_IAID:
|
case PROP_DHCP_IAID:
|
||||||
g_value_set_string(value, nm_setting_ip_config_get_dhcp_iaid(setting));
|
g_value_set_string(value, nm_setting_ip_config_get_dhcp_iaid(setting));
|
||||||
break;
|
break;
|
||||||
|
|
@ -6018,6 +6042,9 @@ set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *ps
|
||||||
case PROP_DHCP_TIMEOUT:
|
case PROP_DHCP_TIMEOUT:
|
||||||
priv->dhcp_timeout = g_value_get_int(value);
|
priv->dhcp_timeout = g_value_get_int(value);
|
||||||
break;
|
break;
|
||||||
|
case PROP_REQUIRED_TIMEOUT:
|
||||||
|
priv->required_timeout = g_value_get_int(value);
|
||||||
|
break;
|
||||||
case PROP_DHCP_IAID:
|
case PROP_DHCP_IAID:
|
||||||
g_free(priv->dhcp_iaid);
|
g_free(priv->dhcp_iaid);
|
||||||
priv->dhcp_iaid = g_value_dup_string(value);
|
priv->dhcp_iaid = g_value_dup_string(value);
|
||||||
|
|
@ -6049,6 +6076,7 @@ nm_setting_ip_config_init(NMSettingIPConfig *setting)
|
||||||
priv->dhcp_send_hostname = TRUE;
|
priv->dhcp_send_hostname = TRUE;
|
||||||
priv->may_fail = TRUE;
|
priv->may_fail = TRUE;
|
||||||
priv->dad_timeout = -1;
|
priv->dad_timeout = -1;
|
||||||
|
priv->required_timeout = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -6483,6 +6511,38 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass)
|
||||||
0,
|
0,
|
||||||
G_PARAM_READWRITE | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS);
|
G_PARAM_READWRITE | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NMSettingIPConfig:required-timeout:
|
||||||
|
*
|
||||||
|
* The minimum time interval in milliseconds for which dynamic IP configuration
|
||||||
|
* should be tried before the connection succeeds.
|
||||||
|
*
|
||||||
|
* This property is useful for example if both IPv4 and IPv6 are enabled and
|
||||||
|
* are allowed to fail. Normally the connection succeeds as soon as one of
|
||||||
|
* the two address families completes; by setting a required timeout for
|
||||||
|
* e.g. IPv4, one can ensure that even if IP6 succeeds earlier than IPv4,
|
||||||
|
* NetworkManager waits some time for IPv4 before the connection becomes
|
||||||
|
* active.
|
||||||
|
*
|
||||||
|
* Note that if #NMSettingIPConfig:may-fail is FALSE for the same address
|
||||||
|
* family, this property has no effect as NetworkManager needs to wait for
|
||||||
|
* the full DHCP timeout.
|
||||||
|
*
|
||||||
|
* A zero value means that no required timeout is present, -1 means the
|
||||||
|
* default value (either configuration ipvx.required-timeout override or
|
||||||
|
* zero).
|
||||||
|
*
|
||||||
|
* Since: 1.34, 1.32.4
|
||||||
|
**/
|
||||||
|
obj_properties[PROP_REQUIRED_TIMEOUT] = g_param_spec_int(
|
||||||
|
NM_SETTING_IP_CONFIG_REQUIRED_TIMEOUT,
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
-1,
|
||||||
|
G_MAXINT32,
|
||||||
|
-1,
|
||||||
|
G_PARAM_READWRITE | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NMSettingIPConfig:dhcp-iaid:
|
* NMSettingIPConfig:dhcp-iaid:
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -3868,6 +3868,7 @@ test_connection_diff_a_only(void)
|
||||||
{NM_SETTING_IP_CONFIG_NEVER_DEFAULT, NM_SETTING_DIFF_RESULT_IN_A},
|
{NM_SETTING_IP_CONFIG_NEVER_DEFAULT, NM_SETTING_DIFF_RESULT_IN_A},
|
||||||
{NM_SETTING_IP_CONFIG_MAY_FAIL, NM_SETTING_DIFF_RESULT_IN_A},
|
{NM_SETTING_IP_CONFIG_MAY_FAIL, NM_SETTING_DIFF_RESULT_IN_A},
|
||||||
{NM_SETTING_IP_CONFIG_DAD_TIMEOUT, NM_SETTING_DIFF_RESULT_IN_A},
|
{NM_SETTING_IP_CONFIG_DAD_TIMEOUT, NM_SETTING_DIFF_RESULT_IN_A},
|
||||||
|
{NM_SETTING_IP_CONFIG_REQUIRED_TIMEOUT, NM_SETTING_DIFF_RESULT_IN_A},
|
||||||
{NM_SETTING_IP_CONFIG_DNS_PRIORITY, NM_SETTING_DIFF_RESULT_IN_A},
|
{NM_SETTING_IP_CONFIG_DNS_PRIORITY, NM_SETTING_DIFF_RESULT_IN_A},
|
||||||
{NM_SETTING_IP_CONFIG_DHCP_IAID, NM_SETTING_DIFF_RESULT_IN_A},
|
{NM_SETTING_IP_CONFIG_DHCP_IAID, NM_SETTING_DIFF_RESULT_IN_A},
|
||||||
{NM_SETTING_IP4_CONFIG_DHCP_VENDOR_CLASS_IDENTIFIER, NM_SETTING_DIFF_RESULT_IN_A},
|
{NM_SETTING_IP4_CONFIG_DHCP_VENDOR_CLASS_IDENTIFIER, NM_SETTING_DIFF_RESULT_IN_A},
|
||||||
|
|
|
||||||
|
|
@ -331,6 +331,7 @@ char *nm_ip_routing_rule_to_string(const NMIPRoutingRule * self,
|
||||||
#define NM_SETTING_IP_CONFIG_MAY_FAIL "may-fail"
|
#define NM_SETTING_IP_CONFIG_MAY_FAIL "may-fail"
|
||||||
#define NM_SETTING_IP_CONFIG_DAD_TIMEOUT "dad-timeout"
|
#define NM_SETTING_IP_CONFIG_DAD_TIMEOUT "dad-timeout"
|
||||||
#define NM_SETTING_IP_CONFIG_DHCP_TIMEOUT "dhcp-timeout"
|
#define NM_SETTING_IP_CONFIG_DHCP_TIMEOUT "dhcp-timeout"
|
||||||
|
#define NM_SETTING_IP_CONFIG_REQUIRED_TIMEOUT "required-timeout"
|
||||||
#define NM_SETTING_IP_CONFIG_DHCP_IAID "dhcp-iaid"
|
#define NM_SETTING_IP_CONFIG_DHCP_IAID "dhcp-iaid"
|
||||||
#define NM_SETTING_IP_CONFIG_DHCP_REJECT_SERVERS "dhcp-reject-servers"
|
#define NM_SETTING_IP_CONFIG_DHCP_REJECT_SERVERS "dhcp-reject-servers"
|
||||||
|
|
||||||
|
|
@ -473,6 +474,8 @@ NM_AVAILABLE_IN_1_2
|
||||||
int nm_setting_ip_config_get_dad_timeout(NMSettingIPConfig *setting);
|
int nm_setting_ip_config_get_dad_timeout(NMSettingIPConfig *setting);
|
||||||
NM_AVAILABLE_IN_1_2
|
NM_AVAILABLE_IN_1_2
|
||||||
int nm_setting_ip_config_get_dhcp_timeout(NMSettingIPConfig *setting);
|
int nm_setting_ip_config_get_dhcp_timeout(NMSettingIPConfig *setting);
|
||||||
|
NM_AVAILABLE_IN_1_32_4
|
||||||
|
int nm_setting_ip_config_get_required_timeout(NMSettingIPConfig *setting);
|
||||||
NM_AVAILABLE_IN_1_22
|
NM_AVAILABLE_IN_1_22
|
||||||
const char *nm_setting_ip_config_get_dhcp_iaid(NMSettingIPConfig *setting);
|
const char *nm_setting_ip_config_get_dhcp_iaid(NMSettingIPConfig *setting);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6014,6 +6014,21 @@ static const NMMetaPropertyInfo *const property_infos_IP4_CONFIG[] = {
|
||||||
PROPERTY_INFO (NM_SETTING_IP_CONFIG_MAY_FAIL, DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_MAY_FAIL,
|
PROPERTY_INFO (NM_SETTING_IP_CONFIG_MAY_FAIL, DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_MAY_FAIL,
|
||||||
.property_type = &_pt_gobject_bool,
|
.property_type = &_pt_gobject_bool,
|
||||||
),
|
),
|
||||||
|
PROPERTY_INFO (NM_SETTING_IP_CONFIG_REQUIRED_TIMEOUT, DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_REQUIRED_TIMEOUT,
|
||||||
|
.property_type = &_pt_gobject_int,
|
||||||
|
.property_typ_data = DEFINE_PROPERTY_TYP_DATA_SUBTYPE (gobject_int,
|
||||||
|
.value_infos = INT_VALUE_INFOS (
|
||||||
|
{
|
||||||
|
.value.i64 = -1,
|
||||||
|
.nick = "default",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.value.i64 = G_MAXINT32,
|
||||||
|
.nick = "infinity",
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
PROPERTY_INFO (NM_SETTING_IP_CONFIG_DAD_TIMEOUT, DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DAD_TIMEOUT,
|
PROPERTY_INFO (NM_SETTING_IP_CONFIG_DAD_TIMEOUT, DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DAD_TIMEOUT,
|
||||||
.property_type = &_pt_gobject_int,
|
.property_type = &_pt_gobject_int,
|
||||||
.property_typ_data = DEFINE_PROPERTY_TYP_DATA_SUBTYPE (gobject_int,
|
.property_typ_data = DEFINE_PROPERTY_TYP_DATA_SUBTYPE (gobject_int,
|
||||||
|
|
@ -6217,6 +6232,21 @@ static const NMMetaPropertyInfo *const property_infos_IP6_CONFIG[] = {
|
||||||
PROPERTY_INFO (NM_SETTING_IP_CONFIG_MAY_FAIL, DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_MAY_FAIL,
|
PROPERTY_INFO (NM_SETTING_IP_CONFIG_MAY_FAIL, DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_MAY_FAIL,
|
||||||
.property_type = &_pt_gobject_bool,
|
.property_type = &_pt_gobject_bool,
|
||||||
),
|
),
|
||||||
|
PROPERTY_INFO (NM_SETTING_IP_CONFIG_REQUIRED_TIMEOUT, DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_REQUIRED_TIMEOUT,
|
||||||
|
.property_type = &_pt_gobject_int,
|
||||||
|
.property_typ_data = DEFINE_PROPERTY_TYP_DATA_SUBTYPE (gobject_int,
|
||||||
|
.value_infos = INT_VALUE_INFOS (
|
||||||
|
{
|
||||||
|
.value.i64 = -1,
|
||||||
|
.nick = "default",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.value.i64 = G_MAXINT32,
|
||||||
|
.nick = "infinity",
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
PROPERTY_INFO_WITH_DESC (NM_SETTING_IP6_CONFIG_IP6_PRIVACY,
|
PROPERTY_INFO_WITH_DESC (NM_SETTING_IP6_CONFIG_IP6_PRIVACY,
|
||||||
.property_type = &_pt_gobject_enum,
|
.property_type = &_pt_gobject_enum,
|
||||||
.property_typ_data = DEFINE_PROPERTY_TYP_DATA_SUBTYPE (gobject_enum,
|
.property_typ_data = DEFINE_PROPERTY_TYP_DATA_SUBTYPE (gobject_enum,
|
||||||
|
|
|
||||||
|
|
@ -247,6 +247,7 @@
|
||||||
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_MAY_FAIL N_("If TRUE, allow overall network configuration to proceed even if the configuration specified by this property times out. Note that at least one IP configuration must succeed or overall network configuration will still fail. For example, in IPv6-only networks, setting this property to TRUE on the NMSettingIP4Config allows the overall network configuration to succeed if IPv4 configuration fails but IPv6 configuration completes successfully.")
|
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_MAY_FAIL N_("If TRUE, allow overall network configuration to proceed even if the configuration specified by this property times out. Note that at least one IP configuration must succeed or overall network configuration will still fail. For example, in IPv6-only networks, setting this property to TRUE on the NMSettingIP4Config allows the overall network configuration to succeed if IPv4 configuration fails but IPv6 configuration completes successfully.")
|
||||||
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_METHOD N_("IP configuration method. NMSettingIP4Config and NMSettingIP6Config both support \"disabled\", \"auto\", \"manual\", and \"link-local\". See the subclass-specific documentation for other values. In general, for the \"auto\" method, properties such as \"dns\" and \"routes\" specify information that is added on to the information returned from automatic configuration. The \"ignore-auto-routes\" and \"ignore-auto-dns\" properties modify this behavior. For methods that imply no upstream network, such as \"shared\" or \"link-local\", these properties must be empty. For IPv4 method \"shared\", the IP subnet can be configured by adding one manual IPv4 address or otherwise 10.42.x.0/24 is chosen. Note that the shared method must be configured on the interface which shares the internet to a subnet, not on the uplink which is shared.")
|
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_METHOD N_("IP configuration method. NMSettingIP4Config and NMSettingIP6Config both support \"disabled\", \"auto\", \"manual\", and \"link-local\". See the subclass-specific documentation for other values. In general, for the \"auto\" method, properties such as \"dns\" and \"routes\" specify information that is added on to the information returned from automatic configuration. The \"ignore-auto-routes\" and \"ignore-auto-dns\" properties modify this behavior. For methods that imply no upstream network, such as \"shared\" or \"link-local\", these properties must be empty. For IPv4 method \"shared\", the IP subnet can be configured by adding one manual IPv4 address or otherwise 10.42.x.0/24 is chosen. Note that the shared method must be configured on the interface which shares the internet to a subnet, not on the uplink which is shared.")
|
||||||
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_NEVER_DEFAULT N_("If TRUE, this connection will never be the default connection for this IP type, meaning it will never be assigned the default route by NetworkManager.")
|
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_NEVER_DEFAULT N_("If TRUE, this connection will never be the default connection for this IP type, meaning it will never be assigned the default route by NetworkManager.")
|
||||||
|
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_REQUIRED_TIMEOUT N_("The minimum time interval in milliseconds for which dynamic IP configuration should be tried before the connection succeeds. This property is useful for example if both IPv4 and IPv6 are enabled and are allowed to fail. Normally the connection succeeds as soon as one of the two address families completes; by setting a required timeout for e.g. IPv4, one can ensure that even if IP6 succeeds earlier than IPv4, NetworkManager waits some time for IPv4 before the connection becomes active. Note that if \"may-fail\" is FALSE for the same address family, this property has no effect as NetworkManager needs to wait for the full DHCP timeout. A zero value means that no required timeout is present, -1 means the default value (either configuration ipvx.required-timeout override or zero).")
|
||||||
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_ROUTE_METRIC N_("The default metric for routes that don't explicitly specify a metric. The default value -1 means that the metric is chosen automatically based on the device type. The metric applies to dynamic routes, manual (static) routes that don't have an explicit metric setting, address prefix routes, and the default route. Note that for IPv6, the kernel accepts zero (0) but coerces it to 1024 (user default). Hence, setting this property to zero effectively mean setting it to 1024. For IPv4, zero is a regular value for the metric.")
|
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_ROUTE_METRIC N_("The default metric for routes that don't explicitly specify a metric. The default value -1 means that the metric is chosen automatically based on the device type. The metric applies to dynamic routes, manual (static) routes that don't have an explicit metric setting, address prefix routes, and the default route. Note that for IPv6, the kernel accepts zero (0) but coerces it to 1024 (user default). Hence, setting this property to zero effectively mean setting it to 1024. For IPv4, zero is a regular value for the metric.")
|
||||||
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_ROUTE_TABLE N_("Enable policy routing (source routing) and set the routing table used when adding routes. This affects all routes, including device-routes, IPv4LL, DHCP, SLAAC, default-routes and static routes. But note that static routes can individually overwrite the setting by explicitly specifying a non-zero routing table. If the table setting is left at zero, it is eligible to be overwritten via global configuration. If the property is zero even after applying the global configuration value, policy routing is disabled for the address family of this connection. Policy routing disabled means that NetworkManager will add all routes to the main table (except static routes that explicitly configure a different table). Additionally, NetworkManager will not delete any extraneous routes from tables except the main table. This is to preserve backward compatibility for users who manage routing tables outside of NetworkManager.")
|
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_ROUTE_TABLE N_("Enable policy routing (source routing) and set the routing table used when adding routes. This affects all routes, including device-routes, IPv4LL, DHCP, SLAAC, default-routes and static routes. But note that static routes can individually overwrite the setting by explicitly specifying a non-zero routing table. If the table setting is left at zero, it is eligible to be overwritten via global configuration. If the property is zero even after applying the global configuration value, policy routing is disabled for the address family of this connection. Policy routing disabled means that NetworkManager will add all routes to the main table (except static routes that explicitly configure a different table). Additionally, NetworkManager will not delete any extraneous routes from tables except the main table. This is to preserve backward compatibility for users who manage routing tables outside of NetworkManager.")
|
||||||
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_ROUTES N_("A list of IPv4 destination addresses, prefix length, optional IPv4 next hop addresses, optional route metric, optional attribute. The valid syntax is: \"ip[/prefix] [next-hop] [metric] [attribute=val]...[,ip[/prefix]...]\". For example \"192.0.2.0/24 10.1.1.1 77, 198.51.100.0/24\".")
|
#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_ROUTES N_("A list of IPv4 destination addresses, prefix length, optional IPv4 next hop addresses, optional route metric, optional attribute. The valid syntax is: \"ip[/prefix] [next-hop] [metric] [attribute=val]...[,ip[/prefix]...]\". For example \"192.0.2.0/24 10.1.1.1 77, 198.51.100.0/24\".")
|
||||||
|
|
@ -272,6 +273,7 @@
|
||||||
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_METHOD N_("IP configuration method. NMSettingIP4Config and NMSettingIP6Config both support \"disabled\", \"auto\", \"manual\", and \"link-local\". See the subclass-specific documentation for other values. In general, for the \"auto\" method, properties such as \"dns\" and \"routes\" specify information that is added on to the information returned from automatic configuration. The \"ignore-auto-routes\" and \"ignore-auto-dns\" properties modify this behavior. For methods that imply no upstream network, such as \"shared\" or \"link-local\", these properties must be empty. For IPv4 method \"shared\", the IP subnet can be configured by adding one manual IPv4 address or otherwise 10.42.x.0/24 is chosen. Note that the shared method must be configured on the interface which shares the internet to a subnet, not on the uplink which is shared.")
|
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_METHOD N_("IP configuration method. NMSettingIP4Config and NMSettingIP6Config both support \"disabled\", \"auto\", \"manual\", and \"link-local\". See the subclass-specific documentation for other values. In general, for the \"auto\" method, properties such as \"dns\" and \"routes\" specify information that is added on to the information returned from automatic configuration. The \"ignore-auto-routes\" and \"ignore-auto-dns\" properties modify this behavior. For methods that imply no upstream network, such as \"shared\" or \"link-local\", these properties must be empty. For IPv4 method \"shared\", the IP subnet can be configured by adding one manual IPv4 address or otherwise 10.42.x.0/24 is chosen. Note that the shared method must be configured on the interface which shares the internet to a subnet, not on the uplink which is shared.")
|
||||||
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_NEVER_DEFAULT N_("If TRUE, this connection will never be the default connection for this IP type, meaning it will never be assigned the default route by NetworkManager.")
|
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_NEVER_DEFAULT N_("If TRUE, this connection will never be the default connection for this IP type, meaning it will never be assigned the default route by NetworkManager.")
|
||||||
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_RA_TIMEOUT N_("A timeout for waiting Router Advertisements in seconds. If zero (the default), a globally configured default is used. If still unspecified, the timeout depends on the sysctl settings of the device. Set to 2147483647 (MAXINT32) for infinity.")
|
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_RA_TIMEOUT N_("A timeout for waiting Router Advertisements in seconds. If zero (the default), a globally configured default is used. If still unspecified, the timeout depends on the sysctl settings of the device. Set to 2147483647 (MAXINT32) for infinity.")
|
||||||
|
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_REQUIRED_TIMEOUT N_("The minimum time interval in milliseconds for which dynamic IP configuration should be tried before the connection succeeds. This property is useful for example if both IPv4 and IPv6 are enabled and are allowed to fail. Normally the connection succeeds as soon as one of the two address families completes; by setting a required timeout for e.g. IPv4, one can ensure that even if IP6 succeeds earlier than IPv4, NetworkManager waits some time for IPv4 before the connection becomes active. Note that if \"may-fail\" is FALSE for the same address family, this property has no effect as NetworkManager needs to wait for the full DHCP timeout. A zero value means that no required timeout is present, -1 means the default value (either configuration ipvx.required-timeout override or zero).")
|
||||||
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_ROUTE_METRIC N_("The default metric for routes that don't explicitly specify a metric. The default value -1 means that the metric is chosen automatically based on the device type. The metric applies to dynamic routes, manual (static) routes that don't have an explicit metric setting, address prefix routes, and the default route. Note that for IPv6, the kernel accepts zero (0) but coerces it to 1024 (user default). Hence, setting this property to zero effectively mean setting it to 1024. For IPv4, zero is a regular value for the metric.")
|
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_ROUTE_METRIC N_("The default metric for routes that don't explicitly specify a metric. The default value -1 means that the metric is chosen automatically based on the device type. The metric applies to dynamic routes, manual (static) routes that don't have an explicit metric setting, address prefix routes, and the default route. Note that for IPv6, the kernel accepts zero (0) but coerces it to 1024 (user default). Hence, setting this property to zero effectively mean setting it to 1024. For IPv4, zero is a regular value for the metric.")
|
||||||
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_ROUTE_TABLE N_("Enable policy routing (source routing) and set the routing table used when adding routes. This affects all routes, including device-routes, IPv4LL, DHCP, SLAAC, default-routes and static routes. But note that static routes can individually overwrite the setting by explicitly specifying a non-zero routing table. If the table setting is left at zero, it is eligible to be overwritten via global configuration. If the property is zero even after applying the global configuration value, policy routing is disabled for the address family of this connection. Policy routing disabled means that NetworkManager will add all routes to the main table (except static routes that explicitly configure a different table). Additionally, NetworkManager will not delete any extraneous routes from tables except the main table. This is to preserve backward compatibility for users who manage routing tables outside of NetworkManager.")
|
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_ROUTE_TABLE N_("Enable policy routing (source routing) and set the routing table used when adding routes. This affects all routes, including device-routes, IPv4LL, DHCP, SLAAC, default-routes and static routes. But note that static routes can individually overwrite the setting by explicitly specifying a non-zero routing table. If the table setting is left at zero, it is eligible to be overwritten via global configuration. If the property is zero even after applying the global configuration value, policy routing is disabled for the address family of this connection. Policy routing disabled means that NetworkManager will add all routes to the main table (except static routes that explicitly configure a different table). Additionally, NetworkManager will not delete any extraneous routes from tables except the main table. This is to preserve backward compatibility for users who manage routing tables outside of NetworkManager.")
|
||||||
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_ROUTES N_("Array of IP routes.")
|
#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_ROUTES N_("Array of IP routes.")
|
||||||
|
|
|
||||||
|
|
@ -683,6 +683,8 @@
|
||||||
description="If TRUE, this connection will never be the default connection for this IP type, meaning it will never be assigned the default route by NetworkManager." />
|
description="If TRUE, this connection will never be the default connection for this IP type, meaning it will never be assigned the default route by NetworkManager." />
|
||||||
<property name="may-fail"
|
<property name="may-fail"
|
||||||
description="If TRUE, allow overall network configuration to proceed even if the configuration specified by this property times out. Note that at least one IP configuration must succeed or overall network configuration will still fail. For example, in IPv6-only networks, setting this property to TRUE on the NMSettingIP4Config allows the overall network configuration to succeed if IPv4 configuration fails but IPv6 configuration completes successfully." />
|
description="If TRUE, allow overall network configuration to proceed even if the configuration specified by this property times out. Note that at least one IP configuration must succeed or overall network configuration will still fail. For example, in IPv6-only networks, setting this property to TRUE on the NMSettingIP4Config allows the overall network configuration to succeed if IPv4 configuration fails but IPv6 configuration completes successfully." />
|
||||||
|
<property name="required-timeout"
|
||||||
|
description="The minimum time interval in milliseconds for which dynamic IP configuration should be tried before the connection succeeds. This property is useful for example if both IPv4 and IPv6 are enabled and are allowed to fail. Normally the connection succeeds as soon as one of the two address families completes; by setting a required timeout for e.g. IPv4, one can ensure that even if IP6 succeeds earlier than IPv4, NetworkManager waits some time for IPv4 before the connection becomes active. Note that if "may-fail" is FALSE for the same address family, this property has no effect as NetworkManager needs to wait for the full DHCP timeout. A zero value means that no required timeout is present, -1 means the default value (either configuration ipvx.required-timeout override or zero)." />
|
||||||
<property name="dad-timeout"
|
<property name="dad-timeout"
|
||||||
description="Timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activation will fail. A zero value means that no duplicate address detection is performed, -1 means the default value (either configuration ipvx.dad-timeout override or zero). A value greater than zero is a timeout in milliseconds. The property is currently implemented only for IPv4." />
|
description="Timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activation will fail. A zero value means that no duplicate address detection is performed, -1 means the default value (either configuration ipvx.dad-timeout override or zero). A value greater than zero is a timeout in milliseconds. The property is currently implemented only for IPv4." />
|
||||||
<property name="dhcp-vendor-class-identifier"
|
<property name="dhcp-vendor-class-identifier"
|
||||||
|
|
@ -722,6 +724,8 @@
|
||||||
description="If TRUE, this connection will never be the default connection for this IP type, meaning it will never be assigned the default route by NetworkManager." />
|
description="If TRUE, this connection will never be the default connection for this IP type, meaning it will never be assigned the default route by NetworkManager." />
|
||||||
<property name="may-fail"
|
<property name="may-fail"
|
||||||
description="If TRUE, allow overall network configuration to proceed even if the configuration specified by this property times out. Note that at least one IP configuration must succeed or overall network configuration will still fail. For example, in IPv6-only networks, setting this property to TRUE on the NMSettingIP4Config allows the overall network configuration to succeed if IPv4 configuration fails but IPv6 configuration completes successfully." />
|
description="If TRUE, allow overall network configuration to proceed even if the configuration specified by this property times out. Note that at least one IP configuration must succeed or overall network configuration will still fail. For example, in IPv6-only networks, setting this property to TRUE on the NMSettingIP4Config allows the overall network configuration to succeed if IPv4 configuration fails but IPv6 configuration completes successfully." />
|
||||||
|
<property name="required-timeout"
|
||||||
|
description="The minimum time interval in milliseconds for which dynamic IP configuration should be tried before the connection succeeds. This property is useful for example if both IPv4 and IPv6 are enabled and are allowed to fail. Normally the connection succeeds as soon as one of the two address families completes; by setting a required timeout for e.g. IPv4, one can ensure that even if IP6 succeeds earlier than IPv4, NetworkManager waits some time for IPv4 before the connection becomes active. Note that if "may-fail" is FALSE for the same address family, this property has no effect as NetworkManager needs to wait for the full DHCP timeout. A zero value means that no required timeout is present, -1 means the default value (either configuration ipvx.required-timeout override or zero)." />
|
||||||
<property name="ip6-privacy"
|
<property name="ip6-privacy"
|
||||||
description="Configure IPv6 Privacy Extensions for SLAAC, described in RFC4941. If enabled, it makes the kernel generate a temporary IPv6 address in addition to the public one generated from MAC address via modified EUI-64. This enhances privacy, but could cause problems in some applications, on the other hand. The permitted values are: -1: unknown, 0: disabled, 1: enabled (prefer public address), 2: enabled (prefer temporary addresses). Having a per-connection setting set to "-1" (unknown) means fallback to global configuration "ipv6.ip6-privacy". If also global configuration is unspecified or set to "-1", fallback to read "/proc/sys/net/ipv6/conf/default/use_tempaddr". Note that this setting is distinct from the Stable Privacy addresses that can be enabled with the "addr-gen-mode" property's "stable-privacy" setting as another way of avoiding host tracking with IPv6 addresses." />
|
description="Configure IPv6 Privacy Extensions for SLAAC, described in RFC4941. If enabled, it makes the kernel generate a temporary IPv6 address in addition to the public one generated from MAC address via modified EUI-64. This enhances privacy, but could cause problems in some applications, on the other hand. The permitted values are: -1: unknown, 0: disabled, 1: enabled (prefer public address), 2: enabled (prefer temporary addresses). Having a per-connection setting set to "-1" (unknown) means fallback to global configuration "ipv6.ip6-privacy". If also global configuration is unspecified or set to "-1", fallback to read "/proc/sys/net/ipv6/conf/default/use_tempaddr". Note that this setting is distinct from the Stable Privacy addresses that can be enabled with the "addr-gen-mode" property's "stable-privacy" setting as another way of avoiding host tracking with IPv6 addresses." />
|
||||||
<property name="addr-gen-mode"
|
<property name="addr-gen-mode"
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue