ppp-manager: fix crash in create_pppd_cmd_line() for ADSL with PPPOE protocol

Failed to lookup pppoe_binary, which results in a failed assertion

    NetworkManager:ERROR:ppp-manager/nm-ppp-manager.c:949:create_pppd_cmd_line: assertion failed: (pppoe_binary != NULL)

https://bugzilla.gnome.org/show_bug.cgi?id=759001

Fixes: 7955806a02
This commit is contained in:
Thomas Haller 2015-12-04 14:19:51 +01:00
parent 77c7292fc6
commit dd088ed595

View file

@ -865,7 +865,8 @@ create_pppd_cmd_line (NMPPPManager *self,
return NULL;
if ( pppoe
|| (adsl && strcmp (nm_setting_adsl_get_protocol (adsl), NM_SETTING_ADSL_PROTOCOL_PPPOE))) {
|| ( adsl
&& !strcmp (nm_setting_adsl_get_protocol (adsl), NM_SETTING_ADSL_PROTOCOL_PPPOE))) {
pppoe_binary = nm_utils_find_helper ("pppoe", NULL, err);
if (!pppoe_binary)
return NULL;