summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2015-05-08 11:44:59 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2015-05-08 11:44:59 +0200
commit0a6083489c4076333a69f8b382abca371ac74956 (patch)
treeb3031f456c6849352c0b8c70db48088975e73cc5
parent9e4d40855d5bc70d30b814ebe5ca791abc1bcf3f (diff)
downloadNetworkManager-bg/kernel-pppoe-mtu-bgo742939.tar.gz
fixup! device: set Ethernet MTU for PPPoE connections in stage2/configbg/kernel-pppoe-mtu-bgo742939
-rw-r--r--src/devices/nm-device-ethernet.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/devices/nm-device-ethernet.c b/src/devices/nm-device-ethernet.c
index 0d184a5c16..8edf683498 100644
--- a/src/devices/nm-device-ethernet.c
+++ b/src/devices/nm-device-ethernet.c
@@ -1308,19 +1308,15 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *reason)
s_ppp = (NMSettingPpp *) device_get_setting (device, NM_TYPE_SETTING_PPP);
if (s_ppp) {
guint32 mtu = 0, mru = 0, mxu;
- const char *iface;
- int ifindex;
mtu = nm_setting_ppp_get_mtu (s_ppp);
mru = nm_setting_ppp_get_mru (s_ppp);
mxu = mru > mtu ? mru : mtu;
if (mxu) {
- iface = nm_device_get_iface (device);
- ifindex = nm_platform_link_get_ifindex (NM_PLATFORM_GET, iface);
-
_LOGD (LOGD_PPP, "set MTU to %u (PPP interface MRU %u, MTU %u)",
mxu + PPPOE_ENCAP_OVERHEAD, mru, mtu);
- nm_platform_link_set_mtu (NM_PLATFORM_GET, ifindex,
+ nm_platform_link_set_mtu (NM_PLATFORM_GET,
+ nm_device_get_ifindex (device),
mxu + PPPOE_ENCAP_OVERHEAD);
}
}