mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-05 04:10:36 +01:00
device: skip IP configuration phase for external devices
We already avoid committing the IP configuration for external devices (see commit60334a2893). However, we still start DHCP/IPv6-autoconf and, especially, we change sysctl values of the device. To be sure that no action is taken on the device, return early from the IP configuration phase, as in the method=disabled/ignore case. https://bugzilla.redhat.com/show_bug.cgi?id=1530288 (cherry picked from commit22f32a16f5)
This commit is contained in:
parent
ba7c7c8402
commit
a169247b7d
1 changed files with 12 additions and 0 deletions
|
|
@ -8161,6 +8161,12 @@ nm_device_activate_stage3_ip4_start (NMDevice *self)
|
|||
|
||||
g_assert (priv->ip4_state == IP_WAIT);
|
||||
|
||||
if (nm_device_sys_iface_state_is_external (self)) {
|
||||
_set_ip_state (self, AF_INET, IP_DONE);
|
||||
check_ip_state (self, FALSE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
_set_ip_state (self, AF_INET, IP_CONF);
|
||||
ret = NM_DEVICE_GET_CLASS (self)->act_stage3_ip4_config_start (self, &ip4_config, &failure_reason);
|
||||
if (ret == NM_ACT_STAGE_RETURN_SUCCESS) {
|
||||
|
|
@ -8202,6 +8208,12 @@ nm_device_activate_stage3_ip6_start (NMDevice *self)
|
|||
|
||||
g_assert (priv->ip6_state == IP_WAIT);
|
||||
|
||||
if (nm_device_sys_iface_state_is_external (self)) {
|
||||
_set_ip_state (self, AF_INET6, IP_DONE);
|
||||
check_ip_state (self, FALSE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
_set_ip_state (self, AF_INET6, IP_CONF);
|
||||
ret = NM_DEVICE_GET_CLASS (self)->act_stage3_ip6_config_start (self, &ip6_config, &failure_reason);
|
||||
if (ret == NM_ACT_STAGE_RETURN_SUCCESS) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue