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
This commit is contained in:
Francesco Giudici 2017-11-20 14:32:48 +01:00
parent 3d0c5b3bb8
commit efed5254cd

View file

@ -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))