[PATCH] ppp: avoid pppd exiting when no traffic going through

By default pppd will suicide if there are 600s without traffic going through:

  pppd[30575]: Terminating connection due to lack of activity.
  pppd[30575]: Connect time 10.0 minutes.
  pppd[30575]: Sent 0 bytes, received 0 bytes.

This is likely to happen when e.g. the system has both a mobile broadband
connection and an ethernet connection, as the ethernet will take the default

So, avoid this behaviour by explicitly telling pppd not to exit if idle.
 src/ppp-manager/nm-ppp-manager.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c
index 5430837..e856fc1 100644
--- a/src/ppp-manager/nm-ppp-manager.c
+++ b/src/ppp-manager/nm-ppp-manager.c
@@ -964,6 +964,10 @@ create_pppd_cmd_line (NMPPPManager *self,
        nm_cmd_line_add_string (cmd, "lcp-echo-interval");
        nm_cmd_line_add_int (cmd, nm_setting_ppp_get_lcp_echo_interval (setting));
+       /* Avoid pppd to exit if no traffic going through */
+       nm_cmd_line_add_string (cmd, "idle");
+       nm_cmd_line_add_int (cmd, 0);
        nm_cmd_line_add_string (cmd, "ipparam");
        nm_cmd_line_add_string (cmd, priv->dbus_path);

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]