diff --git a/src/modem-manager/nm-modem.c b/src/modem-manager/nm-modem.c index 52b35bfc26..bb94c35b83 100644 --- a/src/modem-manager/nm-modem.c +++ b/src/modem-manager/nm-modem.c @@ -105,18 +105,12 @@ ppp_state_changed (NMPPPManager *ppp_manager, NMPPPStatus status, gpointer user_ NMDevice *device = NM_DEVICE (user_data); switch (status) { - case NM_PPP_STATUS_NETWORK: - nm_device_state_changed (device, NM_DEVICE_STATE_IP_CONFIG, NM_DEVICE_STATE_REASON_NONE); - break; case NM_PPP_STATUS_DISCONNECT: nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_PPP_DISCONNECT); break; case NM_PPP_STATUS_DEAD: nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_PPP_FAILED); break; - case NM_PPP_STATUS_AUTHENTICATE: - nm_device_state_changed (device, NM_DEVICE_STATE_NEED_AUTH, NM_DEVICE_STATE_REASON_NONE); - break; default: break; } @@ -135,6 +129,10 @@ ppp_ip4_config (NMPPPManager *ppp_manager, guint32 bad_dns2 = htonl (0x0A0B0C0E); guint32 good_dns2 = htonl (0x04020202); /* GTE nameserver */ + /* Ignore PPP IP4 events that come in after initial configuration */ + if (nm_device_get_state (device) != NM_DEVICE_STATE_IP_CONFIG) + return; + /* Work around a PPP bug (#1732) which causes many mobile broadband * providers to return 10.11.12.13 and 10.11.12.14 for the DNS servers. * Apparently fixed in ppp-2.4.5 but we've had some reports that this is diff --git a/src/nm-device-bt.c b/src/nm-device-bt.c index 43e3a44eb3..d50f4c3a70 100644 --- a/src/nm-device-bt.c +++ b/src/nm-device-bt.c @@ -287,18 +287,12 @@ ppp_state_changed (NMPPPManager *ppp_manager, NMPPPStatus status, gpointer user_ NMDevice *device = NM_DEVICE (user_data); switch (status) { - case NM_PPP_STATUS_NETWORK: - nm_device_state_changed (device, NM_DEVICE_STATE_IP_CONFIG, NM_DEVICE_STATE_REASON_NONE); - break; case NM_PPP_STATUS_DISCONNECT: nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_PPP_DISCONNECT); break; case NM_PPP_STATUS_DEAD: nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_PPP_FAILED); break; - case NM_PPP_STATUS_AUTHENTICATE: - nm_device_state_changed (device, NM_DEVICE_STATE_NEED_AUTH, NM_DEVICE_STATE_REASON_NONE); - break; default: break; } @@ -312,6 +306,10 @@ ppp_ip4_config (NMPPPManager *ppp_manager, { NMDevice *device = NM_DEVICE (user_data); + /* Ignore PPP IP4 events that come in after initial configuration */ + if (nm_device_get_state (device) != NM_DEVICE_STATE_IP_CONFIG) + return; + nm_device_set_ip_iface (device, iface); NM_DEVICE_BT_GET_PRIVATE (device)->pending_ip4_config = g_object_ref (config); nm_device_activate_schedule_stage4_ip4_config_get (device); diff --git a/src/nm-device-ethernet.c b/src/nm-device-ethernet.c index ef4d58e15e..acd033cf8d 100644 --- a/src/nm-device-ethernet.c +++ b/src/nm-device-ethernet.c @@ -1229,18 +1229,12 @@ ppp_state_changed (NMPPPManager *ppp_manager, NMPPPStatus status, gpointer user_ NMDevice *device = NM_DEVICE (user_data); switch (status) { - case NM_PPP_STATUS_NETWORK: - nm_device_state_changed (device, NM_DEVICE_STATE_IP_CONFIG, NM_DEVICE_STATE_REASON_NONE); - break; case NM_PPP_STATUS_DISCONNECT: nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_PPP_DISCONNECT); break; case NM_PPP_STATUS_DEAD: nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_PPP_FAILED); break; - case NM_PPP_STATUS_AUTHENTICATE: - nm_device_state_changed (device, NM_DEVICE_STATE_NEED_AUTH, NM_DEVICE_STATE_REASON_NONE); - break; default: break; } @@ -1254,6 +1248,10 @@ ppp_ip4_config (NMPPPManager *ppp_manager, { NMDevice *device = NM_DEVICE (user_data); + /* Ignore PPP IP4 events that come in after initial configuration */ + if (nm_device_get_state (device) != NM_DEVICE_STATE_IP_CONFIG) + return; + nm_device_set_ip_iface (device, iface); NM_DEVICE_ETHERNET_GET_PRIVATE (device)->pending_ip4_config = g_object_ref (config); nm_device_activate_schedule_stage4_ip4_config_get (device);