summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco Giudici <fgiudici@redhat.com>2017-11-20 14:32:48 +0100
committerFrancesco Giudici <fgiudici@redhat.com>2017-11-24 17:36:20 +0100
commitefed5254cde007efcb48e353bd00651f37555e6d (patch)
tree91b01ed5b852f557b4e5b5afe1d3a1cbfee70679
parent3d0c5b3bb8ecfb2e6e32d767405bd61b118f42d0 (diff)
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
-rw-r--r--src/devices/nm-device.c3
1 files changed, 3 insertions, 0 deletions
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))