summaryrefslogtreecommitdiff
path: root/src/devices/adsl/nm-device-adsl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/adsl/nm-device-adsl.c')
-rw-r--r--src/devices/adsl/nm-device-adsl.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/devices/adsl/nm-device-adsl.c b/src/devices/adsl/nm-device-adsl.c
index e9bd41ae00..2512c3187e 100644
--- a/src/devices/adsl/nm-device-adsl.c
+++ b/src/devices/adsl/nm-device-adsl.c
@@ -431,8 +431,22 @@ ppp_state_changed (NMPPPManager *ppp_manager, NMPPPStatus status, gpointer user_
}
static void
+ppp_ifindex_set (NMPPPManager *ppp_manager,
+ int ifindex,
+ const char *iface,
+ gpointer user_data)
+{
+ NMDevice *device = NM_DEVICE (user_data);
+
+ if (!nm_device_set_ip_ifindex (device, ifindex)) {
+ nm_device_state_changed (device,
+ NM_DEVICE_STATE_FAILED,
+ NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE);
+ }
+}
+
+static void
ppp_ip4_config (NMPPPManager *ppp_manager,
- const char *iface,
NMIP4Config *config,
gpointer user_data)
{
@@ -440,7 +454,6 @@ ppp_ip4_config (NMPPPManager *ppp_manager,
/* Ignore PPP IP4 events that come in after initial configuration */
if (nm_device_activate_ip4_state_in_conf (device)) {
- nm_device_set_ip_iface (device, iface);
nm_device_activate_schedule_ip4_config_result (device, config);
}
}
@@ -499,6 +512,9 @@ act_stage3_ip4_config_start (NMDevice *device,
g_signal_connect (priv->ppp_manager, NM_PPP_MANAGER_SIGNAL_STATE_CHANGED,
G_CALLBACK (ppp_state_changed),
self);
+ g_signal_connect (priv->ppp_manager, NM_PPP_MANAGER_SIGNAL_IFINDEX_SET,
+ G_CALLBACK (ppp_ifindex_set),
+ self);
g_signal_connect (priv->ppp_manager, NM_PPP_MANAGER_SIGNAL_IP4_CONFIG,
G_CALLBACK (ppp_ip4_config),
self);