mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 03:40:11 +01:00
core: treat missing IPv6 setting as AUTO
Like IPv4, if the connection contains no IPv6 setting, perform IPv6 addressing. Since may-fail defaults to TRUE for IPv6, failure should have no consequence.
This commit is contained in:
parent
a11067f584
commit
6b9511f6e9
5 changed files with 50 additions and 2 deletions
|
|
@ -384,6 +384,17 @@ nm_modem_stage3_ip4_config_start (NMModem *self,
|
|||
return ret;
|
||||
}
|
||||
|
||||
NMActStageReturn
|
||||
nm_modem_stage3_ip6_config_start (NMModem *self,
|
||||
NMDevice *device,
|
||||
NMDeviceClass *device_class,
|
||||
NMDeviceStateReason *reason)
|
||||
{
|
||||
/* FIXME: We don't support IPv6 on modems quite yet... */
|
||||
nm_device_activate_schedule_ip6_config_timeout (device);
|
||||
return NM_ACT_STAGE_RETURN_POSTPONE;
|
||||
}
|
||||
|
||||
static void
|
||||
cancel_get_secrets (NMModem *self)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -130,6 +130,11 @@ NMActStageReturn nm_modem_stage3_ip4_config_start (NMModem *modem,
|
|||
NMDeviceClass *device_class,
|
||||
NMDeviceStateReason *reason);
|
||||
|
||||
NMActStageReturn nm_modem_stage3_ip6_config_start (NMModem *modem,
|
||||
NMDevice *device,
|
||||
NMDeviceClass *device_class,
|
||||
NMDeviceStateReason *reason);
|
||||
|
||||
gboolean nm_modem_get_secrets (NMModem *modem,
|
||||
const char *setting_name,
|
||||
gboolean request_new,
|
||||
|
|
|
|||
|
|
@ -941,6 +941,25 @@ real_act_stage3_ip4_config_start (NMDevice *device,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static NMActStageReturn
|
||||
real_act_stage3_ip6_config_start (NMDevice *device,
|
||||
NMIP6Config **out_config,
|
||||
NMDeviceStateReason *reason)
|
||||
{
|
||||
NMDeviceBtPrivate *priv = NM_DEVICE_BT_GET_PRIVATE (device);
|
||||
NMActStageReturn ret;
|
||||
|
||||
if (priv->bt_type == NM_BT_CAPABILITY_DUN) {
|
||||
ret = nm_modem_stage3_ip6_config_start (NM_DEVICE_BT_GET_PRIVATE (device)->modem,
|
||||
device,
|
||||
NM_DEVICE_CLASS (nm_device_bt_parent_class),
|
||||
reason);
|
||||
} else
|
||||
ret = NM_DEVICE_CLASS (nm_device_bt_parent_class)->act_stage3_ip6_config_start (device, out_config, reason);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
real_deactivate (NMDevice *device)
|
||||
{
|
||||
|
|
@ -1133,6 +1152,7 @@ nm_device_bt_class_init (NMDeviceBtClass *klass)
|
|||
device_class->deactivate = real_deactivate;
|
||||
device_class->act_stage2_config = real_act_stage2_config;
|
||||
device_class->act_stage3_ip4_config_start = real_act_stage3_ip4_config_start;
|
||||
device_class->act_stage3_ip6_config_start = real_act_stage3_ip6_config_start;
|
||||
device_class->check_connection_compatible = real_check_connection_compatible;
|
||||
device_class->complete_connection = real_complete_connection;
|
||||
device_class->hwaddr_matches = hwaddr_matches;
|
||||
|
|
|
|||
|
|
@ -279,6 +279,17 @@ real_act_stage3_ip4_config_start (NMDevice *device,
|
|||
reason);
|
||||
}
|
||||
|
||||
static NMActStageReturn
|
||||
real_act_stage3_ip6_config_start (NMDevice *device,
|
||||
NMIP6Config **out_config,
|
||||
NMDeviceStateReason *reason)
|
||||
{
|
||||
return nm_modem_stage3_ip6_config_start (NM_DEVICE_MODEM_GET_PRIVATE (device)->modem,
|
||||
device,
|
||||
NM_DEVICE_CLASS (nm_device_modem_parent_class),
|
||||
reason);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static gboolean
|
||||
|
|
@ -446,6 +457,7 @@ nm_device_modem_class_init (NMDeviceModemClass *mclass)
|
|||
device_class->act_stage1_prepare = real_act_stage1_prepare;
|
||||
device_class->act_stage2_config = real_act_stage2_config;
|
||||
device_class->act_stage3_ip4_config_start = real_act_stage3_ip4_config_start;
|
||||
device_class->act_stage3_ip6_config_start = real_act_stage3_ip6_config_start;
|
||||
device_class->get_enabled = real_get_enabled;
|
||||
device_class->set_enabled = real_set_enabled;
|
||||
|
||||
|
|
|
|||
|
|
@ -917,8 +917,8 @@ ip6_method_matches (NMConnection *connection, const char *match)
|
|||
g_assert (method);
|
||||
}
|
||||
|
||||
/* Treat missing IP6 setting as IGNORE */
|
||||
if (!s_ip6 && !strcmp (match, NM_SETTING_IP6_CONFIG_METHOD_IGNORE))
|
||||
/* Treat missing IP6 setting as AUTO */
|
||||
if (!s_ip6 && !strcmp (match, NM_SETTING_IP6_CONFIG_METHOD_AUTO))
|
||||
return TRUE;
|
||||
|
||||
return method && !strcmp (method, match);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue