mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-06 10:18:03 +02:00
device: add "is_manual" argument to ready_for_ip_config() device method
Some device types might want to run manual ip configuration while
skipping other methods.
(cherry picked from commit 2ae8433520)
This commit is contained in:
parent
95df70112f
commit
2128e4542e
6 changed files with 7 additions and 7 deletions
|
|
@ -11636,7 +11636,7 @@ activate_stage3_ip_config_for_addr_family(NMDevice *self, int addr_family, const
|
||||||
priv->ip_data_x[IS_IPv4].wait_for_ports = FALSE;
|
priv->ip_data_x[IS_IPv4].wait_for_ports = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (klass->ready_for_ip_config && !klass->ready_for_ip_config(self))
|
if (klass->ready_for_ip_config && !klass->ready_for_ip_config(self, FALSE))
|
||||||
goto out_devip;
|
goto out_devip;
|
||||||
|
|
||||||
if (IS_IPv4) {
|
if (IS_IPv4) {
|
||||||
|
|
@ -11900,7 +11900,7 @@ activate_stage3_ip_config(NMDevice *self)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!nm_device_sys_iface_state_is_external(self)
|
if (!nm_device_sys_iface_state_is_external(self)
|
||||||
&& (!klass->ready_for_ip_config || klass->ready_for_ip_config(self))) {
|
&& (!klass->ready_for_ip_config || klass->ready_for_ip_config(self, TRUE))) {
|
||||||
if (priv->ipmanual_data.state_6 == NM_DEVICE_IP_STATE_NONE
|
if (priv->ipmanual_data.state_6 == NM_DEVICE_IP_STATE_NONE
|
||||||
&& !NM_IN_STRSET(ipv6_method,
|
&& !NM_IN_STRSET(ipv6_method,
|
||||||
NM_SETTING_IP6_CONFIG_METHOD_DISABLED,
|
NM_SETTING_IP6_CONFIG_METHOD_DISABLED,
|
||||||
|
|
|
||||||
|
|
@ -346,7 +346,7 @@ typedef struct _NMDeviceClass {
|
||||||
NMActStageReturn (*act_stage1_prepare)(NMDevice *self, NMDeviceStateReason *out_failure_reason);
|
NMActStageReturn (*act_stage1_prepare)(NMDevice *self, NMDeviceStateReason *out_failure_reason);
|
||||||
NMActStageReturn (*act_stage2_config)(NMDevice *self, NMDeviceStateReason *out_failure_reason);
|
NMActStageReturn (*act_stage2_config)(NMDevice *self, NMDeviceStateReason *out_failure_reason);
|
||||||
void (*act_stage3_ip_config)(NMDevice *self, int addr_family);
|
void (*act_stage3_ip_config)(NMDevice *self, int addr_family);
|
||||||
gboolean (*ready_for_ip_config)(NMDevice *self);
|
gboolean (*ready_for_ip_config)(NMDevice *self, gboolean is_manual);
|
||||||
|
|
||||||
const char *(*get_ip_method_auto)(NMDevice *self, int addr_family);
|
const char *(*get_ip_method_auto)(NMDevice *self, int addr_family);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ get_generic_capabilities(NMDevice *device)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
ready_for_ip_config(NMDevice *device)
|
ready_for_ip_config(NMDevice *device, gboolean is_manual)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -198,7 +198,7 @@ set_platform_mtu(NMDevice *device, guint32 mtu)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
ready_for_ip_config(NMDevice *device)
|
ready_for_ip_config(NMDevice *device, gboolean is_manual)
|
||||||
{
|
{
|
||||||
return nm_device_get_ip_ifindex(device) > 0;
|
return nm_device_get_ip_ifindex(device) > 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ get_generic_capabilities(NMDevice *device)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
ready_for_ip_config(NMDevice *device)
|
ready_for_ip_config(NMDevice *device, gboolean is_manual)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -621,7 +621,7 @@ is_available(NMDevice *device, NMDeviceCheckDevAvailableFlags flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
ready_for_ip_config(NMDevice *device)
|
ready_for_ip_config(NMDevice *device, gboolean is_manual)
|
||||||
{
|
{
|
||||||
/* Tell NMDevice to only run device-specific IP
|
/* Tell NMDevice to only run device-specific IP
|
||||||
* configuration (devip) and skip other methods
|
* configuration (devip) and skip other methods
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue