From dd387785504c1e7d50490c7a1031076ae85d5a71 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Thu, 12 Sep 2019 17:29:49 +0200 Subject: device: introduce generic function to inherit MTU from parent Introduce a generic function to set a MTU based on parent's one. Also define a device-specific @mtu_parent_delta value that specifies the difference from parent MTU that should be set by default. For VLAN it is zero but other interface types (for example MACsec) require a positive value due to encapsulation overhead. --- src/devices/nm-device-private.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/devices/nm-device-private.h') diff --git a/src/devices/nm-device-private.h b/src/devices/nm-device-private.h index 4c38fa7a2a..b4bc6a1bfc 100644 --- a/src/devices/nm-device-private.h +++ b/src/devices/nm-device-private.h @@ -168,6 +168,9 @@ guint32 nm_device_get_configured_mtu_from_connection (NMDevice *device, guint32 nm_device_get_configured_mtu_for_wired (NMDevice *self, NMDeviceMtuSource *out_source); +guint32 nm_device_get_configured_mtu_wired_parent (NMDevice *self, + NMDeviceMtuSource *out_source); + void nm_device_commit_mtu (NMDevice *self); /*****************************************************************************/ -- cgit v1.2.1