about summary refs log tree commit diff
path: root/src/devices/ovs/nm-device-ovs-interface.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2020-07-13 22:06:54 +0200
committerMichael Biebl <biebl@debian.org>2020-07-13 22:06:54 +0200
commitc954a7079d01d0e5fad9c8ad99d8891d9e6f5bed (patch)
tree3f24a6356fc531498ec6b091a67230eaf725145d /src/devices/ovs/nm-device-ovs-interface.c
parent36f77b6d9a724e4bc8e219b15fe446cd3a5e0099 (diff)
parent136d191f1c96dbae1489fed7c2565f5e1b1f8d40 (diff)
Update upstream source from tag 'upstream/1.26.0'
Update to upstream version '1.26.0'
with Debian dir ac612e9c69962647563dd4d6aa7499aacaf8aa3c
Diffstat (limited to 'src/devices/ovs/nm-device-ovs-interface.c')
-rw-r--r--src/devices/ovs/nm-device-ovs-interface.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/devices/ovs/nm-device-ovs-interface.c b/src/devices/ovs/nm-device-ovs-interface.c
index 10f9fa94..83954cf0 100644
--- a/src/devices/ovs/nm-device-ovs-interface.c
+++ b/src/devices/ovs/nm-device-ovs-interface.c
@@ -104,6 +104,14 @@ link_changed (NMDevice *device,
 	priv->waiting_for_interface = FALSE;
 
 	if (nm_device_get_state (device) == NM_DEVICE_STATE_IP_CONFIG) {
+		if (!nm_device_hw_addr_set_cloned (device,
+		                                   nm_device_get_applied_connection (device),
+		                                   FALSE)) {
+			nm_device_state_changed (device,
+			                         NM_DEVICE_STATE_FAILED,
+			                         NM_DEVICE_STATE_REASON_CONFIG_FAILED);
+			return;
+		}
 		nm_device_bring_up (device, TRUE, NULL);
 		nm_device_activate_schedule_stage3_ip_config_start (device);
 	}
@@ -176,6 +184,13 @@ act_stage3_ip_config_start (NMDevice *device,
 		return NM_ACT_STAGE_RETURN_POSTPONE;
 	}
 
+	if (!nm_device_hw_addr_set_cloned (device,
+	                                   nm_device_get_applied_connection (device),
+	                                   FALSE)) {
+		*out_failure_reason = NM_DEVICE_STATE_REASON_CONFIG_FAILED;
+		return NM_ACT_STAGE_RETURN_FAILURE;
+	}
+
 	return NM_DEVICE_CLASS (nm_device_ovs_interface_parent_class)->act_stage3_ip_config_start (device, addr_family, out_config, out_failure_reason);
 }