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
route.

So, avoid this behaviour by explicitly telling pppd not to exit if idle.
This commit is contained in:
Aleksander Morgado 2014-05-09 12:34:38 +02:00 committed by Dan Williams
parent 050c30da0b
commit 2b82fd0e1d

View file

@ -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);