diff options
| author | Michael Biebl <biebl@debian.org> | 2019-11-25 18:54:42 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2019-11-25 18:54:42 +0100 |
| commit | 56e2e0e97cd4786bf3b1f7fd607d4a9e4fc6bc8d (patch) | |
| tree | 43de6f27b10e23ff907dbe4e2c8fe0e52f01b13b /src/devices/nm-device-vlan.c | |
| parent | 85b54c33239239aa9ec8ff2f128f25a72dd587e1 (diff) | |
| parent | e22609983008e1a669196ad64ba3a59ae8c76e0d (diff) | |
Update upstream source from tag 'upstream/1.20.8'
Update to upstream version '1.20.8' with Debian dir 5fbac145116049621c01e7eb75da24ed4f79d25e
Diffstat (limited to 'src/devices/nm-device-vlan.c')
| -rw-r--r-- | src/devices/nm-device-vlan.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/src/devices/nm-device-vlan.c b/src/devices/nm-device-vlan.c index 0467a6e4..f8f6a597 100644 --- a/src/devices/nm-device-vlan.c +++ b/src/devices/nm-device-vlan.c @@ -523,26 +523,6 @@ act_stage1_prepare (NMDevice *device, NMDeviceStateReason *out_failure_reason) return ret; } -static guint32 -get_configured_mtu (NMDevice *self, NMDeviceMtuSource *out_source) -{ - guint32 mtu = 0; - int ifindex; - - 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) { - mtu = nm_platform_link_get_mtu (nm_device_get_platform (NM_DEVICE (self)), ifindex); - *out_source = NM_DEVICE_MTU_SOURCE_PARENT; - } - - return mtu; -} - /*****************************************************************************/ static void @@ -598,13 +578,14 @@ nm_device_vlan_class_init (NMDeviceVlanClass *klass) device_class->connection_type_supported = NM_SETTING_VLAN_SETTING_NAME; device_class->connection_type_check_compatible = NM_SETTING_VLAN_SETTING_NAME; device_class->link_types = NM_DEVICE_DEFINE_LINK_TYPES (NM_LINK_TYPE_VLAN); + device_class->mtu_parent_delta = 0; /* VLANs can have the same MTU of parent */ device_class->create_and_realize = create_and_realize; device_class->link_changed = link_changed; device_class->unrealize_notify = unrealize_notify; device_class->get_generic_capabilities = get_generic_capabilities; device_class->act_stage1_prepare = act_stage1_prepare; - device_class->get_configured_mtu = get_configured_mtu; + device_class->get_configured_mtu = nm_device_get_configured_mtu_wired_parent; device_class->is_available = is_available; device_class->parent_changed_notify = parent_changed_notify; |