From efed5254cde007efcb48e353bd00651f37555e6d Mon Sep 17 00:00:00 2001 From: Francesco Giudici Date: Mon, 20 Nov 2017 14:32:48 +0100 Subject: [PATCH] device: update device mtu from ip interface when required If the tracked device is a control device only (has no network interface) like in the case of a cdc-wdm device, get the mtu from the ip interface (the exposed wwan network interface in this case). https://bugzilla.redhat.com/show_bug.cgi?id=1460217 --- src/devices/nm-device.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 13ef6b348f..f8c2adfd19 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -2829,6 +2829,9 @@ device_ip_link_changed (NMDevice *self) if (!pllink) return G_SOURCE_REMOVE; + if (priv->ifindex <= 0 && pllink->mtu) + _set_mtu (self, pllink->mtu); + _stats_update_counters_from_pllink (self, pllink); if (_ip_iface_update (self, pllink->name))