Re: issues with pppd error handling

On Wed, Nov 22, 2017 at 04:18:09PM +0100, Piotr Figiel wrote:
I'm looking into couple issues we stumbled on with pppd and
NetworkManager. It's tested on NetworkManager 1.8.4, ModemManager
1.6.8 and pppd 2.4.7. In general there are sporadic issues with
reconnecting when pppd exits because of LCP echo timeout and when it
exits due to other reasons.


I think for the LCP echo timeout error case setting may-fail to FALSE
on ipv4 on ppp connections should solve the issue. But if anything
from above makes sense to you it seems there are at least couple bugs
there. I think the simplest solution would be to replace
nm-device-modem.c:ppp_failed() contents with:

nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, reason);

Or is there any case when pppd failure should leave the connection active?

I think it's correct to always fail the connection when pppd fails.

Additionally perhaps g_dbus_proxy_call in
nm-pppd-plugin.c:nm_phasechange() could be changed to sync

It would be better to avoid sync calls because they block the pppd
process until a response is received from NM. To ensure that we don't
miss notification on exit, the plugin could register to the
'exitnotify' pppd hook to wait the termination of any pending dbus

Actually, I don't think this can work since there isn't a GLib main
loop... so probably we should just change the async calls to sync
(perhaps only when we know that pppd is about to exit, i.e. for the


Attachment: signature.asc
Description: PGP signature

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