summaryrefslogtreecommitdiff
path: root/src/devices/nm-device-ethernet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/nm-device-ethernet.c')
-rw-r--r--src/devices/nm-device-ethernet.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/devices/nm-device-ethernet.c b/src/devices/nm-device-ethernet.c
index d11f9a11c2..54c8176f67 100644
--- a/src/devices/nm-device-ethernet.c
+++ b/src/devices/nm-device-ethernet.c
@@ -953,8 +953,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)
{
@@ -962,7 +976,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);
}
}
@@ -1009,6 +1022,9 @@ pppoe_stage3_ip4_config_start (NMDeviceEthernet *self, NMDeviceStateReason *out_
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);