about summary refs log tree commit diff
path: root/src/devices/nm-device-vlan.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2018-07-01 20:59:09 +0200
committerMichael Biebl <biebl@debian.org>2018-07-01 20:59:09 +0200
commit6106f75cc14c2d8af6999bd28dd075c32411deaf (patch)
tree2e084cc81011fc5cec703704f2ff5b65f5a7fa8d /src/devices/nm-device-vlan.c
parente8b3308b1970e9b71b443479351e173cb89e3800 (diff)
parent429393567647935d9123e21fd27a7529d50255eb (diff)
Update upstream source from tag 'upstream/1.12.0'
Update to upstream version '1.12.0'
with Debian dir 76506925b30952acfa95c8f5b789bcfb2a8e3a6e
Diffstat (limited to 'src/devices/nm-device-vlan.c')
-rw-r--r--src/devices/nm-device-vlan.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/devices/nm-device-vlan.c b/src/devices/nm-device-vlan.c
index a7f4c4bc..b0e746a8 100644
--- a/src/devices/nm-device-vlan.c
+++ b/src/devices/nm-device-vlan.c
@@ -534,19 +534,21 @@ act_stage1_prepare (NMDevice *device, NMDeviceStateReason *out_failure_reason)
 }
 
 static guint32
-get_configured_mtu (NMDevice *self, gboolean *out_is_user_config)
+get_configured_mtu (NMDevice *self, NMDeviceMtuSource *out_source)
 {
 	guint32 mtu = 0;
 	int ifindex;
 
-	mtu = nm_device_get_configured_mtu_for_wired (self, out_is_user_config);
-	if (*out_is_user_config)
+	mtu = nm_device_get_configured_mtu_for_wired (self, out_source);
+	if (*out_source != NM_DEVICE_MTU_SOURCE_NONE)
 		return mtu;
 
 	/* Inherit the MTU from parent device, if any */
 	ifindex = nm_device_parent_get_ifindex (self);
-	if (ifindex > 0)
+	if (ifindex > 0) {
 		mtu = nm_platform_link_get_mtu (nm_device_get_platform (NM_DEVICE (self)), ifindex);
+		*out_source = NM_DEVICE_MTU_SOURCE_PARENT;
+	}
 
 	return mtu;
 }