Beniamino Galvani 2022-07-18 07:50:03 +02:00
commit e122df6005
8 changed files with 11 additions and 16 deletions

View file

@ -11806,7 +11806,7 @@ activate_stage3_ip_config_for_addr_family(NMDevice *self, int addr_family, const
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;
if (IS_IPv4) {
@ -12073,7 +12073,7 @@ activate_stage3_ip_config(NMDevice *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
&& !NM_IN_STRSET(ipv6_method,
NM_SETTING_IP6_CONFIG_METHOD_DISABLED,

View file

@ -347,7 +347,7 @@ typedef struct _NMDeviceClass {
NMActStageReturn (*act_stage1_prepare)(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);
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);

View file

@ -67,7 +67,7 @@ get_generic_capabilities(NMDevice *device)
}
static gboolean
ready_for_ip_config(NMDevice *device)
ready_for_ip_config(NMDevice *device, gboolean is_manual)
{
return FALSE;
}

View file

@ -198,7 +198,7 @@ set_platform_mtu(NMDevice *device, guint32 mtu)
}
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;
}

View file

@ -61,7 +61,7 @@ get_generic_capabilities(NMDevice *device)
}
static gboolean
ready_for_ip_config(NMDevice *device)
ready_for_ip_config(NMDevice *device, gboolean is_manual)
{
return FALSE;
}

View file

@ -621,13 +621,13 @@ is_available(NMDevice *device, NMDeviceCheckDevAvailableFlags flags)
}
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 manual and device-specific IP
* configuration (devip) and skip other methods
* (manual, dhcp, etc).
* (dhcp, link-local, shared, etc).
*/
return FALSE;
return is_manual;
}
/*****************************************************************************/

View file

@ -1032,7 +1032,6 @@ stage3_ip_config_start(NMModem *modem, int addr_family, NMModemIPMethod ip_metho
l3cd = nm_l3_config_data_new(nm_platform_get_multi_idx(NM_PLATFORM_GET),
ifindex,
NM_IP_CONFIG_SOURCE_WWAN);
nm_l3_config_data_set_dns_priority(l3cd, AF_INET, 0);
address = (NMPlatformIP4Address){
.address = address_network,
@ -1116,11 +1115,9 @@ stage3_ip_config_start(NMModem *modem, int addr_family, NMModemIPMethod ip_metho
_LOGI("IPv6 base configuration:");
l3cd = nm_l3_config_data_new(nm_platform_get_multi_idx(NM_PLATFORM_GET),
l3cd = nm_l3_config_data_new(nm_platform_get_multi_idx(NM_PLATFORM_GET),
ifindex,
NM_IP_CONFIG_SOURCE_WWAN);
nm_l3_config_data_set_dns_priority(l3cd, AF_INET6, 0);
do_auto = TRUE;
address.plen = mm_bearer_ip_config_get_prefix(self->_priv.ipv6_config);

View file

@ -545,7 +545,6 @@ impl_ppp_manager_set_ip4_config(NMDBusObject *obj,
NM_IP_CONFIG_SOURCE_PPP);
nm_l3_config_data_set_mtu(l3cd, mtu);
nm_l3_config_data_set_dns_priority(l3cd, AF_INET, 0);
address = (NMPlatformIP4Address){
.plen = 32,
@ -661,7 +660,6 @@ impl_ppp_manager_set_ip6_config(NMDBusObject *obj,
NM_IP_CONFIG_SOURCE_PPP);
nm_l3_config_data_set_mtu(l3cd, mtu);
nm_l3_config_data_set_dns_priority(l3cd, AF_INET6, 0);
address = (NMPlatformIP6Address){
.plen = 64,