summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2022-07-18 07:50:03 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2022-07-18 07:50:03 +0200
commite122df6005b88efec1d6ee3b114e7356c65373b1 (patch)
tree7bbfe592b765ead1a3a0d07f42e0f58f3724234f
parent5e4632f0210bc59b84976048ceeb12704e556b06 (diff)
parent8c17760f62f5dc34f459c5b6e6d791f3f0e220d6 (diff)
downloadNetworkManager-e122df6005b88efec1d6ee3b114e7356c65373b1.tar.gz
core: merge branch 'bg/l3cd-dns-priority'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1045 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1298
-rw-r--r--src/core/devices/nm-device.c4
-rw-r--r--src/core/devices/nm-device.h2
-rw-r--r--src/core/devices/ovs/nm-device-ovs-bridge.c2
-rw-r--r--src/core/devices/ovs/nm-device-ovs-interface.c2
-rw-r--r--src/core/devices/ovs/nm-device-ovs-port.c2
-rw-r--r--src/core/devices/wwan/nm-device-modem.c8
-rw-r--r--src/core/devices/wwan/nm-modem-broadband.c5
-rw-r--r--src/core/ppp/nm-ppp-manager.c2
8 files changed, 11 insertions, 16 deletions
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c
index 6ad98af1b6..8c58453b55 100644
--- a/src/core/devices/nm-device.c
+++ b/src/core/devices/nm-device.c
@@ -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,
diff --git a/src/core/devices/nm-device.h b/src/core/devices/nm-device.h
index 377c2fb6b8..382c866053 100644
--- a/src/core/devices/nm-device.h
+++ b/src/core/devices/nm-device.h
@@ -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);
diff --git a/src/core/devices/ovs/nm-device-ovs-bridge.c b/src/core/devices/ovs/nm-device-ovs-bridge.c
index bea6e77bc8..048afb02b5 100644
--- a/src/core/devices/ovs/nm-device-ovs-bridge.c
+++ b/src/core/devices/ovs/nm-device-ovs-bridge.c
@@ -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;
}
diff --git a/src/core/devices/ovs/nm-device-ovs-interface.c b/src/core/devices/ovs/nm-device-ovs-interface.c
index 6b9d3d7ed4..1f531a6f84 100644
--- a/src/core/devices/ovs/nm-device-ovs-interface.c
+++ b/src/core/devices/ovs/nm-device-ovs-interface.c
@@ -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;
}
diff --git a/src/core/devices/ovs/nm-device-ovs-port.c b/src/core/devices/ovs/nm-device-ovs-port.c
index a64314dd0c..5510e39fbd 100644
--- a/src/core/devices/ovs/nm-device-ovs-port.c
+++ b/src/core/devices/ovs/nm-device-ovs-port.c
@@ -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;
}
diff --git a/src/core/devices/wwan/nm-device-modem.c b/src/core/devices/wwan/nm-device-modem.c
index 77ba1b248f..e0209affcd 100644
--- a/src/core/devices/wwan/nm-device-modem.c
+++ b/src/core/devices/wwan/nm-device-modem.c
@@ -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;
}
/*****************************************************************************/
diff --git a/src/core/devices/wwan/nm-modem-broadband.c b/src/core/devices/wwan/nm-modem-broadband.c
index cbf30f565c..997fe72729 100644
--- a/src/core/devices/wwan/nm-modem-broadband.c
+++ b/src/core/devices/wwan/nm-modem-broadband.c
@@ -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);
diff --git a/src/core/ppp/nm-ppp-manager.c b/src/core/ppp/nm-ppp-manager.c
index 5c2b7681bb..003a9806a0 100644
--- a/src/core/ppp/nm-ppp-manager.c
+++ b/src/core/ppp/nm-ppp-manager.c
@@ -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,