diff --git a/src/core/ppp/nm-ppp-manager.c b/src/core/ppp/nm-ppp-manager.c index bb043a7e4..fbc5d075a 100644 --- a/src/core/ppp/nm-ppp-manager.c +++ b/src/core/ppp/nm-ppp-manager.c @@ -843,7 +843,7 @@ create_pppd_cmd_line(NMPPPManager *self, const char *pppoe_service; nm_strv_ptrarray_add_string_dup(cmd, "plugin"); - nm_strv_ptrarray_add_string_dup(cmd, "rp-pppoe.so"); + nm_strv_ptrarray_add_string_dup(cmd, NM_PPPOE_PLUGIN_NAME); nm_strv_ptrarray_add_string_concat(cmd, "nic-", priv->parent_iface); @@ -872,7 +872,7 @@ create_pppd_cmd_line(NMPPPManager *self, } else if (!strcmp(protocol, NM_SETTING_ADSL_PROTOCOL_PPPOE)) { nm_strv_ptrarray_add_string_dup(cmd, "plugin"); - nm_strv_ptrarray_add_string_dup(cmd, "rp-pppoe.so"); + nm_strv_ptrarray_add_string_dup(cmd, NM_PPPOE_PLUGIN_NAME); nm_strv_ptrarray_add_string_dup(cmd, priv->parent_iface); } diff --git a/src/core/ppp/nm-ppp-status.h b/src/core/ppp/nm-ppp-status.h index 57b48fe92..a2576e9cc 100644 --- a/src/core/ppp/nm-ppp-status.h +++ b/src/core/ppp/nm-ppp-status.h @@ -29,4 +29,10 @@ typedef enum { NM_PPP_STATUS_INTERN_DEAD, } NMPPPStatus; +/*****************************************************************************/ + +/* The plugin name "(rp-)pppoe.so" depends on the ppp version. */ + +#define NM_PPPOE_PLUGIN_NAME (NM_PPP_VERSION_2_5_OR_NEWER ? "pppoe.so" : "rp-pppoe.so") + #endif /* __NM_PPP_STATUS_H__ */