mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 03:08:08 +02:00
ppp: increase PPPoE pppd timeout to 30 seconds
Mostly to help debug stuff like (rh #528314) where it's hanging somewhere in rp-pppoe while trying to connect to the access concentrator.
This commit is contained in:
parent
6f21e935d6
commit
830bded555
5 changed files with 6 additions and 5 deletions
|
|
@ -205,7 +205,7 @@ ppp_stage3_ip4_config_start (NMDevice *device, NMDeviceStateReason *reason)
|
||||||
nm_act_request_get_connection (req));
|
nm_act_request_get_connection (req));
|
||||||
|
|
||||||
priv->ppp_manager = nm_ppp_manager_new (nm_device_get_iface (device));
|
priv->ppp_manager = nm_ppp_manager_new (nm_device_get_iface (device));
|
||||||
if (nm_ppp_manager_start (priv->ppp_manager, req, ppp_name, &err)) {
|
if (nm_ppp_manager_start (priv->ppp_manager, req, ppp_name, 20, &err)) {
|
||||||
g_signal_connect (priv->ppp_manager, "state-changed",
|
g_signal_connect (priv->ppp_manager, "state-changed",
|
||||||
G_CALLBACK (ppp_state_changed),
|
G_CALLBACK (ppp_state_changed),
|
||||||
device);
|
device);
|
||||||
|
|
|
||||||
|
|
@ -423,7 +423,7 @@ ppp_stage3_start (NMDevice *device, NMDeviceStateReason *reason)
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->ppp_manager = nm_ppp_manager_new (priv->rfcomm_iface);
|
priv->ppp_manager = nm_ppp_manager_new (priv->rfcomm_iface);
|
||||||
if (nm_ppp_manager_start (priv->ppp_manager, req, ppp_name, &err)) {
|
if (nm_ppp_manager_start (priv->ppp_manager, req, ppp_name, 20, &err)) {
|
||||||
g_signal_connect (priv->ppp_manager, "state-changed",
|
g_signal_connect (priv->ppp_manager, "state-changed",
|
||||||
G_CALLBACK (ppp_state_changed),
|
G_CALLBACK (ppp_state_changed),
|
||||||
device);
|
device);
|
||||||
|
|
|
||||||
|
|
@ -1302,7 +1302,7 @@ pppoe_stage3_ip4_config_start (NMDeviceEthernet *self, NMDeviceStateReason *reas
|
||||||
g_assert (s_pppoe);
|
g_assert (s_pppoe);
|
||||||
|
|
||||||
priv->ppp_manager = nm_ppp_manager_new (nm_device_get_iface (NM_DEVICE (self)));
|
priv->ppp_manager = nm_ppp_manager_new (nm_device_get_iface (NM_DEVICE (self)));
|
||||||
if (nm_ppp_manager_start (priv->ppp_manager, req, nm_setting_pppoe_get_username (s_pppoe), &err)) {
|
if (nm_ppp_manager_start (priv->ppp_manager, req, nm_setting_pppoe_get_username (s_pppoe), 30, &err)) {
|
||||||
g_signal_connect (priv->ppp_manager, "state-changed",
|
g_signal_connect (priv->ppp_manager, "state-changed",
|
||||||
G_CALLBACK (ppp_state_changed),
|
G_CALLBACK (ppp_state_changed),
|
||||||
self);
|
self);
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,6 @@ static gboolean impl_ppp_manager_set_ip4_config (NMPPPManager *manager,
|
||||||
#include "nm-ppp-manager-glue.h"
|
#include "nm-ppp-manager-glue.h"
|
||||||
|
|
||||||
#define NM_PPPD_PLUGIN PLUGINDIR "/nm-pppd-plugin.so"
|
#define NM_PPPD_PLUGIN PLUGINDIR "/nm-pppd-plugin.so"
|
||||||
#define NM_PPP_WAIT_PPPD 20 /* seconds */
|
|
||||||
#define PPP_MANAGER_SECRET_TRIES "ppp-manager-secret-tries"
|
#define PPP_MANAGER_SECRET_TRIES "ppp-manager-secret-tries"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
@ -879,6 +878,7 @@ gboolean
|
||||||
nm_ppp_manager_start (NMPPPManager *manager,
|
nm_ppp_manager_start (NMPPPManager *manager,
|
||||||
NMActRequest *req,
|
NMActRequest *req,
|
||||||
const char *ppp_name,
|
const char *ppp_name,
|
||||||
|
guint32 timeout_secs,
|
||||||
GError **err)
|
GError **err)
|
||||||
{
|
{
|
||||||
NMPPPManagerPrivate *priv;
|
NMPPPManagerPrivate *priv;
|
||||||
|
|
@ -930,7 +930,7 @@ nm_ppp_manager_start (NMPPPManager *manager,
|
||||||
nm_debug ("ppp started with pid %d", priv->pid);
|
nm_debug ("ppp started with pid %d", priv->pid);
|
||||||
|
|
||||||
priv->ppp_watch_id = g_child_watch_add (priv->pid, (GChildWatchFunc) ppp_watch_cb, manager);
|
priv->ppp_watch_id = g_child_watch_add (priv->pid, (GChildWatchFunc) ppp_watch_cb, manager);
|
||||||
priv->ppp_timeout_handler = g_timeout_add_seconds (NM_PPP_WAIT_PPPD, pppd_timed_out, manager);
|
priv->ppp_timeout_handler = g_timeout_add_seconds (timeout_secs, pppd_timed_out, manager);
|
||||||
priv->act_req = g_object_ref (req);
|
priv->act_req = g_object_ref (req);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,7 @@ NMPPPManager *nm_ppp_manager_new (const char *iface);
|
||||||
gboolean nm_ppp_manager_start (NMPPPManager *manager,
|
gboolean nm_ppp_manager_start (NMPPPManager *manager,
|
||||||
NMActRequest *req,
|
NMActRequest *req,
|
||||||
const char *ppp_name,
|
const char *ppp_name,
|
||||||
|
guint32 timeout_secs,
|
||||||
GError **err);
|
GError **err);
|
||||||
|
|
||||||
void nm_ppp_manager_update_secrets (NMPPPManager *manager,
|
void nm_ppp_manager_update_secrets (NMPPPManager *manager,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue