From 48ff789e8bf991e1ba9fdfea3d19e14a6f395517 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Sat, 25 Nov 2017 11:36:55 +0100 Subject: device: ppp: chain up to parent for non-auto IP methods The PPP device only handles automatic configuration, everything else should be handled by NMDevice. --- src/devices/nm-device-ppp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/devices/nm-device-ppp.c b/src/devices/nm-device-ppp.c index a8ae7e309d..aa3fe0553b 100644 --- a/src/devices/nm-device-ppp.c +++ b/src/devices/nm-device-ppp.c @@ -21,6 +21,7 @@ #include "nm-device-private.h" #include "nm-manager.h" #include "nm-setting-pppoe.h" +#include "nm-setting-ip4-config.h" #include "platform/nm-platform.h" #include "ppp/nm-ppp-manager.h" #include "ppp/nm-ppp-manager-call.h" @@ -199,9 +200,20 @@ act_stage3_ip4_config_start (NMDevice *device, { NMDevicePpp *self = NM_DEVICE_PPP (device); NMDevicePppPrivate *priv = NM_DEVICE_PPP_GET_PRIVATE (self); + NMSettingIPConfig *s_ip4; + NMDeviceClass *dev_class; _LOGT (LOGD_DEVICE | LOGD_PPP, "ip4 config start"); + s_ip4 = (NMSettingIPConfig *) nm_device_get_applied_setting (device, NM_TYPE_SETTING_IP4_CONFIG); + if (!nm_streq0 (nm_setting_ip_config_get_method (s_ip4), + NM_SETTING_IP4_CONFIG_METHOD_AUTO)) { + dev_class = NM_DEVICE_CLASS (nm_device_ppp_parent_class); + return dev_class->act_stage3_ip4_config_start (device, + out_config, + out_failure_reason); + } + if (priv->ip4_config) { if (out_config) *out_config = g_steal_pointer (&priv->ip4_config); -- cgit v1.2.1